Get all available regions for the SDB service.
| Return type: | list |
|---|---|
| Returns: | A list of boto.sdb.regioninfo.RegionInfo |
Store attributes for multiple items in a domain.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Returns: | True if successful |
Create a SimpleDB domain.
| Parameter: | domain_name (string) – The name of the new domain |
|---|---|
| Return type: | boto.sdb.domain.Domain object |
| Returns: | The newly created domain |
Delete attributes from a given item in a domain.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Returns: | True if successful |
Delete a SimpleDB domain.
| Parameter: | domain_or_name (string or boto.sdb.domain.Domain object.) – Either the name of a domain or a Domain object |
|---|---|
| Return type: | bool |
| Returns: | True if successful |
B{Note:} This will delete the domain and all items within the domain.
Get the Metadata for a SimpleDB domain.
| Parameter: | domain_or_name (string or boto.sdb.domain.Domain object.) – Either the name of a domain or a Domain object |
|---|---|
| Return type: | boto.sdb.domain.DomainMetaData object |
| Returns: | The newly created domain metadata object |
Retrieve attributes for a given item in a domain.
| Parameters: |
|
|---|---|
| Return type: | |
| Returns: | An Item mapping type containing the requested attribute name/values |
Returns the BoxUsage accumulated on this SDBConnection object.
| Return type: | float |
|---|---|
| Returns: | The accumulated BoxUsage of all requests made on the connection. |
Lookup an existing SimpleDB domain
| Parameter: | domain_name (string) – The name of the new domain |
|---|---|
| Return type: | boto.sdb.domain.Domain object or None |
| Returns: | The Domain object or None if the domain does not exist. |
Store attributes for a given item in a domain.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Returns: | True if successful |
Returns a list of item names within domain_name that match the query.
| Parameters: |
|
|---|---|
| Return type: | ResultSet |
| Returns: | An iterator containing the results. |
Returns a set of Attributes for item names within domain_name that match the query.
| Parameters: |
|
|---|---|
| Return type: | ResultSet |
| Returns: | An iterator containing the results. |
Returns a set of Attributes for item names within domain_name that match the query. The query must be expressed in using the SELECT style syntax rather than the original SimpleDB query language. Even though the select request does not require a domain object, a domain object must be passed into this method so the Item objects returned can point to the appropriate domain.
| Parameters: |
|
|---|---|
| Return type: | ResultSet |
| Returns: | An iterator containing the results. |
Returns a list of fully populated items that match the query provided.
The name/value pairs for all of the matching item names are retrieved in a number of separate threads (specified by num_threads) to achieve maximum throughput. The ResultSet that is returned has an attribute called next_token that can be used to retrieve additional results for the same query.
Returns the appropriate Manager class for a given Model class. It does this by looking in the boto config for a section like this:
[DB]
db_type = SimpleDB
db_user = <aws access key id>
db_passwd = <aws secret access key>
db_name = my_domain
[DB_TestBasic]
db_type = SimpleDB
db_user = <another aws access key id>
db_passwd = <another aws secret access key>
db_name = basic_domain
db_port = 1111
The values in the DB section are “generic values” that will be used if nothing more specific is found. You can also create a section for a specific Model class that gives the db info for that class. In the example above, TestBasic is a Model subclass.
Note
This module requires psycopg2 to be installed in the Python path.
Responsible for converting base Python types to format compatible with underlying database. For SimpleDB, that means everything needs to be converted to a string when stored in SimpleDB and from a string when retrieved.
To convert a value, pass it to the encode or decode method. The encode method will take a Python native value and convert to DB format. The decode method will take a DB format value and convert it to Python native format. To find the appropriate method to call, the generic encode/decode methods will look for the type-specific method by searching for a method called “encode_<type name>” or “decode_<type name>”.
Responsible for converting base Python types to format compatible with underlying database. For SimpleDB, that means everything needs to be converted to a string when stored in SimpleDB and from a string when retrieved.
To convert a value, pass it to the encode or decode method. The encode method will take a Python native value and convert to DB format. The decode method will take a DB format value and convert it to Python native format. To find the appropriate method to call, the generic encode/decode methods will look for the type-specific method by searching for a method called “encode_<type name>” or “decode_<type name>”.
Hashed property who’s original value can not be retrieved, but still can be compaired.
Represents an SDB Domain
Store attributes for multiple items.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Returns: | True if successful |
Delete attributes from a given item.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Returns: | True if successful |
Retrieve attributes for a given item.
| Parameters: |
|
|---|---|
| Return type: | |
| Returns: | An Item mapping type containing the requested attribute name/values |
Store attributes for a given item.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Returns: | True if successful |
Returns a list of items within domain that match the query.
| Parameters: |
|
|---|---|
| Return type: | iter |
| Returns: | An iterator containing the results. This is actually a generator function that will iterate across all search results, not just the first page. |
Returns a set of Attributes for item names within domain_name that match the query. The query must be expressed in using the SELECT style syntax rather than the original SimpleDB query language.
| Parameters: |
|
|---|---|
| Return type: | iter |
| Returns: | An iterator containing the results. This is actually a generator function that will iterate across all search results, not just the first page. |
Get this domain as an XML DOM Document :param f: Optional File to dump directly to :type f: File or Stream
| Returns: | File object where the XML has been dumped to |
|---|---|
| Return type: | file |
SAX parser for a domain that has been dumped
Represents an SDB Item
Checks a value to see if it is of the right type.
Should raise a TypeError exception if an in appropriate value is passed in.
Takes a string as input and returns the type-specific value represented by that string.
Should raise a ValueError if the value cannot be converted to the appropriate type.
Convert a value to it’s string representation.
Should raise a ValueError if the value cannot be converted to a string representation.
Special Multi Value for boto persistence layer to allow us to do obj.list.append(foo)