Skip to main content

(dsv,jetstream) --> dataframe <--> bitemporal-tables

Project description

polars-hist-db

This library is for scraping data from CSV style files, temporally, into MariaDB.

Main features are:

  • Uploading data from strongly-typed Polars DataFrames.
  • Querying data into Polars DataFrames, with column types inferred from the database schema.
  • A scrape specification that:
    • Defines pipelines for typing, enriching, and normalizing data before uploading.
    • Allows construction of the 'as-of' time from file attributes or as a function of the input columns.
    • Catalogs the history of scrape inputs to prevent duplication.
    • Supports per-file transactional scraping (either the processing for a file succeeds, or the transaction is rolled back).

Development Setup

  1. Install NATS server
brew install nats-server
  1. Create a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
  1. Install development dependencies:
poetry install --with dev
  1. Run tests:
poetry run pytest
  1. Make docs. The documentation will be generated in the docs/_build/html directory:
cd docs && poetry run make html

Code Style

This project follows the following code style guidelines:

  • Use type hints for all function parameters and return values
  • Follow PEP 8 style guide
  • Use Google-style docstrings
  • Keep functions focused and single-purpose
  • Write comprehensive tests for new features

Run make check to check the code style.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the terms specified in the LICENSE file.

References

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

polars_hist_db-0.8.27.tar.gz (295.3 kB view details)

Uploaded Source

Built Distribution

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

polars_hist_db-0.8.27-py3-none-any.whl (65.9 kB view details)

Uploaded Python 3

File details

Details for the file polars_hist_db-0.8.27.tar.gz.

File metadata

  • Download URL: polars_hist_db-0.8.27.tar.gz
  • Upload date:
  • Size: 295.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for polars_hist_db-0.8.27.tar.gz
Algorithm Hash digest
SHA256 af8e6b8ff78e5f3a6c6aee0e89877babac1b26e69d4e3bccfcee75265c3f2463
MD5 2c8ea025c4061a8de98c72cb4be73703
BLAKE2b-256 ac74e24e206edc3f75da34d06206a6ede1c121df02edcecf14bf33c7679f063a

See more details on using hashes here.

File details

Details for the file polars_hist_db-0.8.27-py3-none-any.whl.

File metadata

  • Download URL: polars_hist_db-0.8.27-py3-none-any.whl
  • Upload date:
  • Size: 65.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for polars_hist_db-0.8.27-py3-none-any.whl
Algorithm Hash digest
SHA256 bfa22f011e1cdd2b4f8016c8d473e4985c0123f256151e0c3a6399716e8bba60
MD5 19476ef5717833eefbb684960e896478
BLAKE2b-256 2106f0c4a2169e459475907aaa5123139c19d313a194779bdc04b7875b695a06

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