(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
- Install NATS server
brew install nats-server
- Create a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
- Install development dependencies:
poetry install --with dev
- Run tests:
poetry run pytest
- Make docs. The documentation will be generated in the
docs/_build/htmldirectory:
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
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
This project is licensed under the terms specified in the LICENSE file.
References
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file polars_hist_db-0.8.4.tar.gz.
File metadata
- Download URL: polars_hist_db-0.8.4.tar.gz
- Upload date:
- Size: 40.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2442fbfbe8ec02eb90e9a2363df1ad9f813058e1c43a3c83a2131624b5340c1
|
|
| MD5 |
cdb26ebdd155dd6567a59c270c4848a0
|
|
| BLAKE2b-256 |
f2e6cb2a460263fd4ed0b2d647b190a69f84112e951beaa5f8269651c8c42b81
|
File details
Details for the file polars_hist_db-0.8.4-py3-none-any.whl.
File metadata
- Download URL: polars_hist_db-0.8.4-py3-none-any.whl
- Upload date:
- Size: 63.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2ea9d4c0f497a1e6308c82d473133600ad35b98f041c29829b496d2a1d4d2a6
|
|
| MD5 |
d69abde9875250ca6e951fb9d2b7f68f
|
|
| BLAKE2b-256 |
91b241757ca66ae482a768e422c72980b40ff8f769ec025f57a4909fbe1d0b40
|