Skip to main content

ApertureDB Python SDK

Project description

ApertureDB Client Python Module

This is the Python SDK for building applications with ApertureDB.

This comprises of utilities to get data in and out of ApertureDB in an optimal manner. A quick getting started guide is useful to start building with this SDK. For more concrete examples, please refer to:

Installing in a custom virtual environment

pip install aperturedb[complete]

or an installation with only the core part of the SDK

pip install aperturedb

A complete reference of this SDK is available on the official ApertureDB Documentation

Development setup

The recommended way is to clone this repo, and do an editable install as follows:

git clone https://github.com/aperture-data/aperturedb-python.git
cd aperturedb-python
pip install -e .[dev]

Running tests

The tests are inside the test dir. Currently these get run in Linux container. Refer to docker/tests and test/run_test_container for details. Following explanation assumes that the current working directory is test.

The tests bring up a set of components in an isolated network, namely:

  • aperturedb-community
  • lenz
  • nginx
  • ca (for initial provisioning of certificates)
  • webui

To connect to this setup, the ports are exposed to the host as follows:

  • 55556 for TCP connection to aperturedb (via lenz).
  • 8087 for HTTP connection to aperturedb (via nginx).

This can be done manually as:

docker compose up -d

Changes to run the tests in development environment.

Edit the file test/dbinfo.py to loook like the following.

  • DB_TCP_HOST = localhost
  • DB_REST_HOST = localhost
  • DB_TCP_PORT = 55556
  • DB_REST_PORT = 8087

All the tests can be run with:

export GCP_SERVICE_ACCOUNT_KEY=<content of a GCP SERVICE ACCOUNT JSON file>
bash run_test.sh

Running specific tests can be accomplished by invoking it with pytest as follows:

PROJECT=aperturedata KAGGLE_username=ci KAGGLE_key=dummy coverage run -m pytest test_Session.py -v -s --log-cli-level=DEBUG

NOTE:The running environment is assumed to be Linux x86_64. There might be certain changes required for them to be run on MacOS or Windows python environments.

Certain Environment variables that affect the runtime beaviour of the SDK.

These can be used as debugging aids.

Variable type Comments Default value
ADB_DEBUGGABLE boolean allows the application to register a fault handler that dumps a trace when SIGUSR1 is sent to the process not set
LOG_FILE_LEVEL log levels The threshold for emitting log messages into the error.log file WARN
LOG_CONSOLE_LEVEL log levels The threshold for emitting log messages into stdout ERROR
ADB_LOG_FILE string custom file path for the LOG file not set

Reporting bugs

Any error in the functionality / documentation / tests maybe reported by creating a github issue.

Development guidelines

For inclusion of any features, a PR may be created with a patch, and a brief description of the problem and the fix. The CI enforces a coding style guideline with autopep8 and a script to detect trailing white spaces.

If a PR encounters failures, the log will describe the location of the offending line with a description of the problem.

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

aperturedb-0.4.50.tar.gz (129.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aperturedb-0.4.50-py3-none-any.whl (141.9 kB view details)

Uploaded Python 3

File details

Details for the file aperturedb-0.4.50.tar.gz.

File metadata

  • Download URL: aperturedb-0.4.50.tar.gz
  • Upload date:
  • Size: 129.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for aperturedb-0.4.50.tar.gz
Algorithm Hash digest
SHA256 64e2d1cdf7f334c3b32a29bfac55a899b4d323123f9f98ce34c41ad12d73f533
MD5 0b1191f3f443e1f39723d76fa6a04b02
BLAKE2b-256 629bd7c59cb1999be4ad4e1a5ad928e2041fc974c85f6c23f79b191ef347ccd5

See more details on using hashes here.

File details

Details for the file aperturedb-0.4.50-py3-none-any.whl.

File metadata

  • Download URL: aperturedb-0.4.50-py3-none-any.whl
  • Upload date:
  • Size: 141.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for aperturedb-0.4.50-py3-none-any.whl
Algorithm Hash digest
SHA256 08bf9c527b38c181d322fc3240e37fc36e6f074ed7213e53dc44642e2a57f614
MD5 86c2fad48412c9a5e8bc2280362994d6
BLAKE2b-256 12c3e7fc4e085b00065d299f87a95e71979e22483a31c2d472c9ae4d6f2cd1e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page