Skip to main content

The Datastore wrapper for ViUR-Core

This repository contains the datastore wrapper for the ViUR framework. We build our own wrapper around it's REST-API as the original wrapper has significant CPU overhead. Using a fast JSON-Parser (simdjson) and Cython, we can go directly from the received JSON-encoded protocol-wrapper representation to the final python objects, without converting that JSON into an intermediate python object representation which then gets discarded right away.

While it has some ViUR specific functions, it's also possible to use this wrapper outside ViUR.

Using

Just install it via venv, pipenv or requirements.txt into your appengine project. As by now it's a drop in replacement for the original library provided by google, but maybe we break api compatibility in a future release for more performance.

Developing

As a developer we want to have an editable viur-datastore library. We're going to use pipenv for the job and install needed

cd <path/to/viur-testing-project>
pipenv install
pipenv shell
pipenv install build twine
pipenv install -e <path/to/viur-datastore>

Choose a testing project configuration via gcloud if you use configs per projectIds:

gcloud config configurations activate <project-config>

Or use environment variable which projectId we want to use:

export CLOUDSDK_CORE_PROJECT="my-awesome-testing-project"

Yezzzz - now we build that awesome new stuff!:

python -m build

Please take a cup of tea - oh wait - it has just build in seconds. If everything worked fine, you should see some builds in the dist subfolder.

Testing

Now it's time run our test suite before actually releasing our shiny new version:

cd <path/to/viur-datastore>
python -m unittest tests

If everything worked fine and all tests passed you can go on with the release procedure.

Releasing

After building and testing the new version please update changelog, commit everything and tag it with the same version you used in setup.py.

Do you have already installed twine? No? Ok, go back to the developing step!!!

Now please manually bump the version in setup.py, safe the file and here we go.

We only want to provide and upload the generic build - perhaps we'll provide optimized builds per python version, OS and arch in a future release.

Now it's time to get an api key exclusively for this project from pypi and save it to your wallet!

Now the actual release workflow:

cd <path/to/viur-datastore>
twine upload dist/viur-datastore-<version>.tar.gz

You might already have a keyring configured with credentials /api key for pypi or provide username __token__ and password <your api key> in interactive mode.

Release files for viur-datastore 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for viur-datastore 1.2.2
File Size Uploaded
viur-datastore-1.2.2.tar.gz 451.3 kB Details

Release files / viur-datastore-1.2.2.tar.gz

Download URL viur-datastore-1.2.2.tar.gz
Size 451.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e1e89f7357f38b7bfe6a019c43f529c251a91fabfd1c58c9e8fb87985e731458
BLAKE2b-256 checksum
How to use checksums
ba1ba38753302ba69592ec9c6b46e4ba71b3d205a80ff68c3585d47fab0ce299
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release history Release notifications | RSS feed

1.3.14

1 release file

1.3.13

1 release file

1.3.12

1 release file

1.3.11

1 release file

1.3.10

1 release file

1.3.9

1 release file

1.3.8

1 release file

1.3.7

1 release file

1.3.6

1 release file

1.3.5

1 release file

1.3.4

1 release file

1.3.3

1 release file

1.3.2

1 release file

1.3.1

1 release file

This release

1.2.2 This release

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1

1 release file

1.0

1 release file

0.9

1 release file

0.8

1 release file

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page