Skip to main content

Motion Lake Client, a client for the Motion Lake API (a Mobility Data Lake)

Project description

MotionLake Client

MotionLake Client is a Python client library for interacting with a storage server designed for a new mobility data lake solution. It provides functionalities to create collections, store data, query data, and retrieve collections.

Installation

You can install the library via pip:

pip install motion-lake-client

Usage

Here's a brief overview of how to use the library:

from motion_lake_client import BaseClient

# Initialize the client with the base URL of the storage server
client = BaseClient(lake_url='http://localhost:8000')

# Create a new collection
client.create_collection('my_collection')

# Store data in a collection
data = b'example_data'
timestamp = int(datetime.now().timestamp())
client.store('my_collection', data, timestamp)

# Query data from a collection
results = client.query('my_collection', min_timestamp=0, max_timestamp=timestamp, ascending=True)

# Retrieve last item from a collection
last_item = client.get_last_item('my_collection')

# Retrieve first item from a collection
first_item = client.get_first_item('my_collection')

# Get items between two timestamps
items_between = client.get_items_between('my_collection', min_timestamp=0, max_timestamp=timestamp)

# Get items before a timestamp
items_before = client.get_items_before('my_collection', timestamp, limit=10)

# Get items after a timestamp
items_after = client.get_items_after('my_collection', timestamp, limit=10)

# Get all collections
collections = client.get_collections()

Documentation

For detailed documentation and examples, please refer to the official documentation.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any bugs or feature requests.

License

All rights reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

motion-lake-client-0.0.4.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

motion_lake_client-0.0.4-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file motion-lake-client-0.0.4.tar.gz.

File metadata

  • Download URL: motion-lake-client-0.0.4.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for motion-lake-client-0.0.4.tar.gz
Algorithm Hash digest
SHA256 70d4c517988522a2479f138faf6894659b133ddaf83902666b14c3a8f3342b95
MD5 c473242a0ed412d2c1d3f4bbdd3854d9
BLAKE2b-256 3e459e245b27abeea27c35cc02dcfddfc1c8cdc48faf9df396fe73e4d80b0567

See more details on using hashes here.

File details

Details for the file motion_lake_client-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for motion_lake_client-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c54a212d2fc687fba1803184ab5f2d7ae5463acded6e5977fdbfd3801d068063
MD5 2e1edb67fa3b8d01d581bb84d4bb1df2
BLAKE2b-256 6681e82acdc2eb781893cb855565f6f6047501b4f79e33040257ffe0009670b6

See more details on using hashes here.

Supported by

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