Gumo Datastore Library
Project description
gumo-datastore
Configuration
from gumo.core import configure as core_configure
from gumo.datastore import configure as datastore_configure
core_configure(
google_cloud_project='<Google Cloud Platform Project Name>',
google_cloud_location='<Project Main Location (Region)>',
)
datastore_configure(
use_local_emulator=True,
emulator_host='datastore_emulator:8081',
namespace=None,
)
If you need to load environment variables of app.yaml:
import os
import flask
from gumo.core import MockAppEngineEnvironment
# from gumo.core import configure as core_configure
# from gumo.datastore import configure as datastore_configure
# The call to MockAppEngineEnvironment must precede any other initialization code.
if __name__ == '__main__':
app_yaml_path = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
'app.yaml'
)
MockAppEngineEnvironment.load_app_yaml(app_yaml_path=app_yaml_path)
# core_configure(...)
# datastore_configure(...)
# Application Configurations ...
app = flask.Flask(__name__)
# TODO: Add a sample of Repository implementation using DatastoreRepositoryMixin.
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8080, debug=True)
Setup Development Environment
$ git clone https://github.com/gumo-py/gumo-core.git
$ cd gumo-core
$ make setup
Build and Test
$ make build
$ make test
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gumo-datastore-0.1.2a0.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for gumo_datastore-0.1.2a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e17d11e4ef18623cc3a0565f1d0dd30c7eef59c81f5193dcb1a8de7b6b69bef |
|
MD5 | 67364b43c00e1e1fc4a8fda016ccf5ab |
|
BLAKE2b-256 | 38a832a7ce9f937b732e3cd0b1113232f96a47b4e2c4010806c3bcfbf71eb1a7 |