Gumo Core Library
Project description
gumo-core
Configuration
from gumo.core import configure as core_configure
core_configure(
google_cloud_project='<Google Cloud Platform Project Name>',
google_cloud_location='<Project Main Location (Region)>',
)
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
# 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()
# Application Configurations ...
app = flask.Flask(__name__)
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
EntityKey
from gumo.core import EntityKey
from gumo.core import EntityKeyFactory
key = EntityKeyFactory().build(kind='Book', name='978-1-4028-9462-6')
assert isinstance(key, EntityKey)
assert key.key_literal() == "Key('Book', '978-1-4028-9462-6')"
assert key.key_path() == 'Book:978-1-4028-9462-6'
assert key.key_url() == 'Book/978-1-4028-9462-6'
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-core-0.1.1a0.tar.gz
(8.3 kB
view hashes)
Built Distribution
Close
Hashes for gumo_core-0.1.1a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b2a69085b9037b4be4c6bf0f22d9a1df35ec121e718d2063aabf6c517fa89a0 |
|
MD5 | 2329aec0369e5a75acdbce3fa4d23d29 |
|
BLAKE2b-256 | b7e83f419ffbaf47564bd0a8357848a5c29afe4625a84fe67bb37da1162a6595 |