Observed since 20 Oct, 20:55 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
aether.python
A python library with Aether Python functionality
This is the official Python Library with Aether functions.
This library requires Python 3.6 and above.
Python libraries:
Extra dependencies (based on settings):
# standalone
pip3 install aether.python
How to create the package distribution
Execute the following command:
python3 setup.py bdist_wheel
or
./scripts/build.sh
Depending on your preference you can either use virtualenv or pipenv to test the library locally.
First install dependencies (execute it only once):
./scripts/install.sh
After that execute the following command:
source ./venv/bin/activate
./scripts/test.sh
In the root folder run:
pipenv install .
Then to test run:
pipenv run scripts/test.sh
The file scripts/test.ini contains the environment variables used in the tests.
This provides an interface to a Redis server via supplied redis parameters.
It makes available a number of CRUD redis operation which include but not limited to:
- Formats document keys into _{type}:{tenant}:{id} before being cached on redis.
- Retrieves documents based on preformated keys.
- Removes documents based on preformated keys.
- Subscribes to key based channels with a callback function.
from aether.python.redis.task import TaskHelper
REDIS_TASK = TaskHelper(settings, redis_instance)
# Settings must have the following properties:
# REDIS_HOST str - Redis server host,
# REDIS_PORT int - Redis server port,
# REDIS_PASSWORD str - Redis server password,
# REDIS_DB str - Redis database name
# redis_instance (Optional) - Pass an existing redis connection
# (If provided, ignores all settings and uses redis_instance)
document = {
'id': 'document_id',
'name': 'document name'
}
document_type = 'test_document'
aether_tenant = 'prod'
# add document to redis
REDIS_TASK.add(task=document, type=document_type, tenant=aether_tenant)
# retrieve document from redis
REDIS_TASK.get(_id=document['id'], type=document_type, tenant=aether_tenant)
# subcribe to a key based channel
CHANNEL = '_test_document*' # listens for messages published to all channels starting with '_test_document'
def handle_callback(msg):
print(msg) # handle returned message
REDIS_TASK.subscribe(callback=handle_callback, pattern=CHANNEL, keep_alive=True)
# publish document
REDIS_TASK.publish(task=document, type=document_type, tenant=aether_tenant) # this will trigger the 'handle_callback' function with the published document to all subscribed clients
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
avro-python3Environment{
"extras": "",
"marker": null,
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | avro-python3 | runtime |
eha-jsonpathEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | eha-jsonpath | runtime |
jsonschemaEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | jsonschema | runtime |
redisEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | redis | runtime |
requestsEnvironment{
"extras": "security",
"marker": null,
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | requests[security] | runtime |
spavroEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | spavro | runtime |
birdisleEnvironment{
"extras": "",
"marker": "extra == 'test'",
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | birdisle ; extra == 'test' | runtime |
coverageEnvironment{
"extras": "",
"marker": "extra == 'test'",
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | coverage ; extra == 'test' | runtime |
flake8Environment{
"extras": "",
"marker": "extra == 'test'",
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | flake8 ; extra == 'test' | runtime |
flake8-quotesEnvironment{
"extras": "",
"marker": "extra == 'test'",
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | flake8-quotes ; extra == 'test' | runtime |
tblibEnvironment{
"extras": "",
"marker": "extra == 'test'",
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | tblib ; extra == 'test' | runtime |
bdist_wheel · 37.27 KB · Python py3
Shared repository data · GitHub
Observed since 20 Oct, 20:55 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:9e53206292b238fcd3edca1033c01d1c2b0bda94e71e32b58ec1a2e1441635bf