Was this page helpful?
ScyllaDB Python Driver is available under the Apache v2 License. ScyllaDB Python Driver is a fork of DataStax Python Driver. See Copyright here.
Caution
You're viewing documentation for an unstable version of Scylla Python Driver. Switch to the latest stable version.
cassandra.encoder
- Encoders for non-prepared Statements
cassandra.encoder
- Encoders for non-prepared Statements¶A container for mapping python types to CQL string literals when working
with non-prepared statements. The type mapping
can be
directly customized by users.
A map of python types to encoder functions.
Converts None
to the string ‘NULL’.
Default encoder for all objects that do not have a specific encoder function
registered. This function simply calls str()
on the object.
Converts any type into a CQL string, defaulting to cql_encode_object
if mapping
does not contain an entry for the type.
Converts a sequence to a string of the form (item1, item2, ...)
. This
is suitable for IN
value lists.
Escapes quotes in str
objects.
Converts unicode
objects to UTF-8 encoded strings with quote escaping.
Converts strings, buffers, and bytearrays into CQL blob literals.
Converts a datetime.datetime
object to a (string) integer timestamp
with millisecond precision.
Converts a datetime.date
object to a string with format
YYYY-MM-DD
.
Converts a dict into a string of the form {key1: val1, key2: val2, ...}
.
This is suitable for map
type columns.
Converts a sequence to a string of the form [item1, item2, ...]
. This
is suitable for list
type columns.
Converts a sequence to a string of the form {item1, item2, ...}
. This
is suitable for set
type columns.
Converts a sequence to a string of the form (item1, item2, ...)
. This
is suitable for tuple
type columns.
Was this page helpful?
ScyllaDB Python Driver is available under the Apache v2 License. ScyllaDB Python Driver is a fork of DataStax Python Driver. See Copyright here.
cassandra
- Exceptions and Enumscassandra.cluster
- Clusters and Sessionscassandra.policies
- Load balancing and Failure Handling Policiescassandra.auth
- Authenticationcassandra.metadata
- Schema and Ring Topologycassandra.metrics
- Performance Metricscassandra.query
- Prepared Statements, Batch Statements, Tracing, and Row Factoriescassandra.pool
- Hosts and Connection Poolscassandra.protocol
- Protocol Featurescassandra.encoder
- Encoders for non-prepared Statementscassandra.decoder
- Data Return Formatscassandra.concurrent
- Utilities for Concurrent Statement Executioncassandra.connection
- Low Level Connection Infocassandra.util
- Utilitiescassandra.timestamps
- Timestamp Generationcassandra.io.asyncioreactor
- asyncio
Event Loopcassandra.io.asyncorereactor
- asyncore
Event Loopcassandra.io.eventletreactor
- eventlet
-compatible Connectioncassandra.io.libevreactor
- libev
Event Loopcassandra.io.geventreactor
- gevent
-compatible Event Loopcassandra.io.twistedreactor
- Twisted Event Loopcassandra.cqlengine.models
- Table models for object mappingcassandra.cqlengine.columns
- Column types for object mapping modelscassandra.cqlengine.query
- Query and filter model objectscassandra.cqlengine.connection
- Connection management for cqlenginecassandra.cqlengine.management
- Schema management for cqlenginecassandra.cqlengine.usertype
- Model classes for User Defined TypesOn this page
cassandra.encoder
- Encoders for non-prepared StatementsEncoder
Encoder.mapping
Encoder.cql_encode_none()
Encoder.cql_encode_object()
Encoder.cql_encode_all_types()
Encoder.cql_encode_sequence()
Encoder.cql_encode_str()
Encoder.cql_encode_unicode()
Encoder.cql_encode_bytes()
Encoder.cql_encode_datetime()
Encoder.cql_encode_date()
Encoder.cql_encode_map_collection()
Encoder.cql_encode_list_collection()
Encoder.cql_encode_set_collection()
Encoder.cql_encode_tuple()