A simple Google DataStore client
Project description
Simple DataStore Client
A simple Google DataStore client that exposes 3 functions.
def set_key(entity_name: str, key_name: str, **properties: Any) -> None: ...
def get_key(entity_name: str, key_name: str) -> Optional[Entity]: ...
def query_entity( entity_name: str, *query_filters: Tuple[str, str, Any], projection: List[str]=None, limit: Optional[int]=None, ) -> Iterator: ...
Examples
Changing the namespace
The following will change the namespace for all function calls following it.
from datastore_client.client import client client.namespace = 'specific_namespace'
set_key
set_key( entity_name=RECHARGE_NOTES_ENTITY, key_name=note_key, username=username, reference=reference, note=notes, )
get_key
get_key(LOGIN_ENTITY, username)
query_entity
product_list = list(query_entity( PRODUCT_ENTITY, ('network', '=', network_name), ('product_type', '=', product_code), ('bundle_size', '=', denomination), projection=['id'], limit=1, )) print(product_list[0]['id'])
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size datastore_client-0.0.4-py3-none-any.whl (3.2 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size datastore_client-0.0.4.tar.gz (2.6 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for datastore_client-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 749e259240270464428617f5be937210e7af816dea1f7d8bf9731227fa3c9c5a |
|
MD5 | dd55128011d434c927a3ff8332ae06a4 |
|
BLAKE2-256 | 6b83366430569e74bff6fc1899f84bb21e9616a36a838a3d1bcea53455de41fd |