Embedded Cython database for time series that you need to send somewhere
Project description
tempsdb
Embedded Cython library for time series that you need to upload somewhere.
Stored time series with a 8-byte timestamp and a data, which can be of fixed length or variable.
Installation
git clone https://github.com/smok-serwis/tempsdb
cd tempsdb
pip install snakehouse tempsdb
python setup.py install
You need both snakehouse and tempsdb to compile it from the source, though binary wheels are available for whatever you'd like.
If there's a binary wheel that you would like to have, just drop me an issue/
If you're installing it somewhere that you don't need both snakehouse and tempsdb installed, compile your own binary wheel with
python setup.py bdist_wheel
Then copy your resulting wheel and install it via pip on the target system.
Be aware that tempsdb does logging. Consult the docs for how to disable it.
Changelog
v0.6.5
- works on Python 3.10 and 3.11
- fixed warnings about signed to unsigned comparison
v0.6.4
- fixed a bug with slicing chunks in
VarlenSeries
- added extra comparison operators for
VarlenEntry
- added
sync
toVarlenSeries
- fixed a bug with not propagating metadata write exceptions
- fixed a bug with
Database
treatingvarlen
and metadata as real time series
v0.6.3
- added logging for opening and closing series
v0.6.2
- added the context manager syntax to VarlenIterator
- fixed a memory leak that happened during getting current value from an empty series
- added
MemoryPressureManager
support forDatabase
v0.6.1
- fixed an issue with
Iterators
v0.6
- bugfix: fixed some bugs with reading values after close
- added support for storing metadata as minijson
- this will be enabled by default is minijson is importable
- fixed minor compiler warnings
TimeSeries.iterate_range
will accept a parameter calleddirect_bytes
for compatibility withVarlenSeries
. It's value is ignored- more class constructors use explicit typing - faster tempsdb
TimeSeries.get_current_value
will correctly raiseValueError
instead of returning None
v0.5.4
- older TempsDB databases that do not support varlens will be updated upon opening
- added metadata support for databases
- a flush will be done before re-enabling mmap
- bugfix to read archive data
v0.5.3
- added
disable_mmap
,enable_mmap
andopen_chunks_mmap_size
intoVarlenSeries
v0.5.2
- added multiple properties and attributes to
VarlenSeries
v0.5.1
- added
VarlenSeries.close_chunks
Database.sync
will now return 0- indexed-gzip proved to be a poor choice, dropped
setup.py
fixed
v0.5
- if mmap is used, the kernel will be informed after loading the chunk that we don't need it's memory right now
- deleting a
TimeSeries
will now correctly return a zero - both
Database
,TimeSeries
andChunk
destructor will close and emit a warning if the user forgot to - if page_size is default, it won't be written as part of the metadata
- added support for per-series metadata
- following additions to
Database
:delete_series
delete_varlen_series
- following additions to
TimeSeries
:- added
append_padded
- added metadata support,
metadata
property andset_metadata
call
- added
- added variable length series
- added experimental support for gzipping time series
- fixed a bug where getting a series that was already closed would TypeError
- following additions to
Chunk
:get_slice_of_piece_at
get_slice_of_piece_starting_at
get_byte_of_piece
get_timestamp_at
- fixed the behaviour of
AlternativeMMaps
when passed a single index to getitem and setitem - added
StillOpen
exception, chunk won't allow to close itself if it has any remaining references
v0.4.4
- more error conditions during mmap will be supported as well
- ENOMEM will be correctly handled during resize operation
- added
TimeSeries.descriptor_based_access
- added
Chunk.switch_to_mmap_based_access
v0.4.3
- improving handling mmap failures on too low memory
- slightly reduced
metadata.txt
by defaultingpage_size
- moved
Chunk
- added support for gzipping
- added
DirectChunk
- iterating and writing at the same time from multiple threads made safe
- added
TimeSeries.disable_mmap
Iterator
's destructor will emit a warning if you forget to close it explicitly.- added option for transparent gzip compression Please note that gzip disables mmap!
- experimental gzip support for constant-length time series
v0.4.2
- empty series will return an Iterator
- bugfix release fixed
Database.create_series
Database
constructor will throw if no database is there- changed
Iterator.next
toIterator.next_item
, synce Cython guys said to not implement the methodnext
on iterators.
v0.4.1
- bugfix release fixed
get_open_series
v0.4
- can install from sdist now
v0.3
- added
TimeSeries.get_current_value
- added
Database.sync
v0.2
- added
get_open_series
- added
get_all_series
- added
get_first_entry_for
- added
close_all_open_series
- added
TimeSeries.name
- added option to use descriptor based access instead of mmap
- added
TimeSeries.open_chunks_ram_size
v0.1
First release
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 Distributions
Built Distributions
File details
Details for the file tempsdb-0.6.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: tempsdb-0.6.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 3.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | deff4f673233e02204f18823a8052b6b688903b23184c470cdd17a024780ed42 |
|
MD5 | dc0a56a78f6db4dadff1df2b43c382d1 |
|
BLAKE2b-256 | ec1bf3a499693956b1220198b0e32d55861f2cc5c5493147496a922c9ce13685 |
File details
Details for the file tempsdb-0.6.5-cp39-cp39-manylinux2014_x86_64.whl
.
File metadata
- Download URL: tempsdb-0.6.5-cp39-cp39-manylinux2014_x86_64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.9
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3a78c447f3a290d2157a5a3650ce3d0afff5f07721dc87cd01a590874b3ba60 |
|
MD5 | b97678a3a0329ffcbc22a8b5e3fa21ac |
|
BLAKE2b-256 | 7d7d9a3550fc2c6536f42798a3dbb7bf0dc942a0f6609a91dbf3c83294acfc5d |