Skip to main content

A simple data logging server and client.

Project description

FinallyDataLogger

FinallyDataLogger is a simple, lightweight data logging server and client package. Log, modify, and fetch data with ease!

Features

  • Log data from any Python script easily.
  • Store scalar, textual, and binary blob data (currently numpy arrays).
  • Fetch and modify data based on criteria.
  • Local server setup for easy data storage and retrieval.

Installation

pip install FinallyDataLogger

Quick Start

Starting the server

From the command line:

finally_data_logger_server --port 5000 --dir /path/to/storage/directory

Using the client

In your Python script:

from finally_data_logger import DataLogger

logger = DataLogger(port=5000)

# Log some data
data = {
    "name": "test1",
    "duration": 0.3,
    "image": your_numpy_image
}
response = logger.log_data(data)
print(response)

# Fetch data
criteria = {'name': 'test*'}
results = logger.get_data(criteria, fetch_blob=True)
print(results)


#To delete specific data based on criteria:
criteria = {'name': 'test*'}
response = logger.delete_data(criteria)
print(response)

#To reset the entire database and remove all logged data:
logger.reset_database()

API

Server Endpoints

  • POST /log_data: Log data to the server.
  • PUT /modify_data/<entry_id>: Modify a data entry by its ID.
  • POST /get_data: Fetch data based on criteria.
  • POST /delete_data: Delete data from the server based on given criteria.
  • POST /reset_database: Reset the entire database and remove all blobs.

Client Methods

  • log_data(data): Log data to the server.
  • modify_data(entry_id, modifications): Modify a data entry by its ID.
  • get_data(criteria): Fetch data based on criteria.
  • delete_data(criteria): Delete data from the server based on given criteria.
  • reset_database(): Reset the entire database and remove all blobs on the server.

Contributing

Contributions are welcome! Please read the CONTRIBUTING guide for more information.

License

MIT License

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

finally_data_logger-0.1.2.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

finally_data_logger-0.1.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file finally_data_logger-0.1.2.tar.gz.

File metadata

  • Download URL: finally_data_logger-0.1.2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for finally_data_logger-0.1.2.tar.gz
Algorithm Hash digest
SHA256 989c96806bbc29b59b64002d14096f46762ae8dba06ca754dee73588f4434217
MD5 afe117d5277c2f9cb574aa302af3cd7b
BLAKE2b-256 c62cee3ce0bd68589a7bf5a8dd771cc26ab6589534bb688c11e9a74689fb0035

See more details on using hashes here.

File details

Details for the file finally_data_logger-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for finally_data_logger-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5b6d96071d8a1d6e4900e494728d72ddbfca4a27d3d900b92c0f766a89e61b44
MD5 f093588d4b58d76c7ec2854077c8468f
BLAKE2b-256 21ec23db6c9504c3486c7bc097467ad81e97d670d2ccfb9651610e3bb28cfcfa

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