tempsdb


Nametempsdb JSON
Version 0.6.5 PyPI version JSON
download
home_pagehttps://github.com/smok-serwis/tempsdb
SummaryEmbedded Cython database for time series that you need to send somewhere
upload_time2024-04-05 12:29:25
maintainerNone
docs_urlNone
authorPiotr Maślanka
requires_python!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage
            # tempsdb

[![PyPI](https://img.shields.io/pypi/pyversions/tempsdb.svg)](https://pypi.python.org/pypi/tempsdb)
[![PyPI version](https://badge.fury.io/py/tempsdb.svg)](https://badge.fury.io/py/tempsdb)
[![PyPI](https://img.shields.io/pypi/implementation/tempsdb.svg)](https://pypi.python.org/pypi/tempsdb)
[![Documentation Status](https://readthedocs.org/projects/tempsdb/badge/?version=latest)](http://tempsdb.readthedocs.io/en/latest/?badge=latest)
[![Maintainability](https://api.codeclimate.com/v1/badges/657b03d115f6e001633c/maintainability)](https://codeclimate.com/github/smok-serwis/tempsdb/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/a0ff30771c71e43e8149/test_coverage)](https://codeclimate.com/github/smok-serwis/tempsdb/test_coverage)
[![Build Status](https://travis-ci.com/smok-serwis/tempsdb.svg)](https://travis-ci.com/smok-serwis/tempsdb)
[![Wheel](https://img.shields.io/pypi/wheel/tempsdb.svg)](https://pypi.org/project/tempsdb/)
[![License](https://img.shields.io/pypi/l/tempsdb)](https://github.com/smok-serwis/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

```bash
git clone https://github.com/smok-serwis/tempsdb
cd tempsdb
pip install snakehouse tempsdb
python setup.py install
```

You need both [snakehouse](https://pypi.org/project/snakehouse/1.2.2/)
and [tempsdb](https://pypi.org/project/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](https://github.com/smok-serwis/tempsdb/issues/new)/
 
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` to `VarlenSeries`
* fixed a bug with not propagating metadata write exceptions
* fixed a bug with `Database` treating `varlen` 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 for `Database`

## 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 called
  `direct_bytes` for compatibility with `VarlenSeries`.
  It's value is ignored
* more class constructors use explicit typing - faster tempsdb
* `TimeSeries.get_current_value` will correctly raise `ValueError` 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` and `open_chunks_mmap_size` into `VarlenSeries`

## 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` and `Chunk` 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 and `set_metadata` call
* 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 defaulting `page_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` to `Iterator.next_item`, 
  synce Cython guys said to not implement the method `next`
  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



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/smok-serwis/tempsdb",
    "name": "tempsdb",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*",
    "maintainer_email": null,
    "keywords": null,
    "author": "Piotr Ma\u015blanka",
    "author_email": "pmaslanka@smok.co",
    "download_url": null,
    "platform": null,
    "description": "# tempsdb\n\n[![PyPI](https://img.shields.io/pypi/pyversions/tempsdb.svg)](https://pypi.python.org/pypi/tempsdb)\n[![PyPI version](https://badge.fury.io/py/tempsdb.svg)](https://badge.fury.io/py/tempsdb)\n[![PyPI](https://img.shields.io/pypi/implementation/tempsdb.svg)](https://pypi.python.org/pypi/tempsdb)\n[![Documentation Status](https://readthedocs.org/projects/tempsdb/badge/?version=latest)](http://tempsdb.readthedocs.io/en/latest/?badge=latest)\n[![Maintainability](https://api.codeclimate.com/v1/badges/657b03d115f6e001633c/maintainability)](https://codeclimate.com/github/smok-serwis/tempsdb/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/a0ff30771c71e43e8149/test_coverage)](https://codeclimate.com/github/smok-serwis/tempsdb/test_coverage)\n[![Build Status](https://travis-ci.com/smok-serwis/tempsdb.svg)](https://travis-ci.com/smok-serwis/tempsdb)\n[![Wheel](https://img.shields.io/pypi/wheel/tempsdb.svg)](https://pypi.org/project/tempsdb/)\n[![License](https://img.shields.io/pypi/l/tempsdb)](https://github.com/smok-serwis/tempsdb)\n\nEmbedded Cython library for time series that you need to upload somewhere.\n\nStored time series with a 8-byte timestamp and a data, which can be of\nfixed length or variable.\n\n# Installation\n\n```bash\ngit clone https://github.com/smok-serwis/tempsdb\ncd tempsdb\npip install snakehouse tempsdb\npython setup.py install\n```\n\nYou need both [snakehouse](https://pypi.org/project/snakehouse/1.2.2/)\nand [tempsdb](https://pypi.org/project/tempsdb/) to compile it from the source,\nthough binary wheels are available for whatever you'd like.\n\nIf there's a binary wheel that you would like to have, \njust drop me an [issue](https://github.com/smok-serwis/tempsdb/issues/new)/\n \nIf you're installing it somewhere that you don't need both snakehouse\nand tempsdb installed, compile your own binary wheel with\n\n```\npython setup.py bdist_wheel\n```\n\nThen copy your resulting wheel and install it via pip on the target system.\n\nBe aware that tempsdb does logging. \nConsult the docs for how to disable it.\n\n# Changelog\n\n## v0.6.5\n\n* works on Python 3.10 and 3.11\n* fixed warnings about signed to unsigned comparison\n\n## v0.6.4\n\n* fixed a bug with slicing chunks in `VarlenSeries`\n* added extra comparison operators for `VarlenEntry`\n* added `sync` to `VarlenSeries`\n* fixed a bug with not propagating metadata write exceptions\n* fixed a bug with `Database` treating `varlen` and metadata as real time series\n\n\n## v0.6.3\n\n* added logging for opening and closing series\n\n## v0.6.2\n\n* added the context manager syntax to VarlenIterator\n* fixed a memory leak that happened during getting current value\n    from an empty series\n* added `MemoryPressureManager` support for `Database`\n\n## v0.6.1\n\n* fixed an issue with `Iterators`\n\n## v0.6\n\n* **bugfix**: fixed some bugs with reading values after close\n* added support for storing metadata as minijson\n    * this will be enabled by default is minijson is importable\n* fixed minor compiler warnings\n* `TimeSeries.iterate_range` will accept a parameter called\n  `direct_bytes` for compatibility with `VarlenSeries`.\n  It's value is ignored\n* more class constructors use explicit typing - faster tempsdb\n* `TimeSeries.get_current_value` will correctly raise `ValueError` instead of returning None\n\n## v0.5.4\n\n* older TempsDB databases that do not support varlens will be updated upon opening\n* added metadata support for databases\n* a flush will be done before re-enabling mmap\n* bugfix to read archive data\n\n## v0.5.3\n\n* added `disable_mmap`, `enable_mmap` and `open_chunks_mmap_size` into `VarlenSeries`\n\n## v0.5.2\n\n* added multiple properties and attributes to `VarlenSeries`\n\n## v0.5.1\n\n* added `VarlenSeries.close_chunks`\n* `Database.sync` will now return 0\n* indexed-gzip proved to be a poor choice, dropped\n* `setup.py` fixed\n\n## v0.5\n\n* if mmap is used, the kernel will be informed after loading the chunk that we \n  don't need it's memory right now\n* deleting a `TimeSeries` will now correctly return a zero\n* both `Database`, `TimeSeries` and `Chunk` destructor will close and \n  emit a warning if the user forgot to\n* if page_size is default, it won't be written as part of the metadata\n* added support for per-series metadata\n* following additions to `Database`:\n    * `delete_series`\n    * `delete_varlen_series`\n* following additions to `TimeSeries`:\n    * added `append_padded`\n    * added metadata support, `metadata` property and `set_metadata` call\n* added variable length series\n* added experimental support for gzipping time series\n* fixed a bug where getting a series that was already closed would TypeError\n* following additions to `Chunk`:\n    * `get_slice_of_piece_at`\n    * `get_slice_of_piece_starting_at`\n    * `get_byte_of_piece`\n    * `get_timestamp_at`\n* fixed the behaviour of `AlternativeMMaps` when passed a single index to __getitem__ and __setitem__\n* added `StillOpen` exception, chunk won't allow to close itself if it has any\n  remaining references\n\n## v0.4.4\n\n* more error conditions during mmap will be supported as well\n* ENOMEM will be correctly handled during resize operation\n* added `TimeSeries.descriptor_based_access`\n* added `Chunk.switch_to_mmap_based_access`\n\n## v0.4.3\n\n* improving handling mmap failures on too low memory\n* slightly reduced `metadata.txt` by defaulting `page_size`\n* moved `Chunk`\n* added support for gzipping\n* added `DirectChunk`\n* iterating and writing at the same time from multiple threads\n    made safe\n* added `TimeSeries.disable_mmap`\n* `Iterator`'s destructor will emit a warning if you forget to close it explicitly.\n* added option for transparent gzip compression\n    Please note that gzip disables mmap!\n* experimental gzip support for constant-length time series\n\n## v0.4.2\n\n* empty series will return an Iterator\n* **bugfix release** fixed `Database.create_series`\n* `Database` constructor will throw if no database is there\n* changed `Iterator.next` to `Iterator.next_item`, \n  synce Cython guys said to not implement the method `next`\n  on iterators.\n\n## v0.4.1\n\n* **bugfix release** fixed `get_open_series`\n\n## v0.4\n\n* can install from sdist now\n\n## v0.3\n\n* added `TimeSeries.get_current_value`\n* added `Database.sync`\n\n## v0.2\n\n* added `get_open_series`\n* added `get_all_series`\n* added `get_first_entry_for`\n* added `close_all_open_series`\n* added `TimeSeries.name`\n* added option to use descriptor based access instead of mmap\n* added `TimeSeries.open_chunks_ram_size`\n\n## v0.1\n\nFirst release\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Embedded Cython database for time series that you need to send somewhere",
    "version": "0.6.5",
    "project_urls": {
        "Code": "https://github.com/smok-serwis/tempsdb",
        "Documentation": "https://tempsdb.readthedocs.io/",
        "Homepage": "https://github.com/smok-serwis/tempsdb",
        "Issue tracker": "https://github.com/smok-serwis/tempsdb/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ec1bf3a499693956b1220198b0e32d55861f2cc5c5493147496a922c9ce13685",
                "md5": "dc0a56a78f6db4dadff1df2b43c382d1",
                "sha256": "deff4f673233e02204f18823a8052b6b688903b23184c470cdd17a024780ed42"
            },
            "downloads": -1,
            "filename": "tempsdb-0.6.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "has_sig": false,
            "md5_digest": "dc0a56a78f6db4dadff1df2b43c382d1",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*",
            "size": 3388540,
            "upload_time": "2024-04-05T12:29:25",
            "upload_time_iso_8601": "2024-04-05T12:29:25.372867Z",
            "url": "https://files.pythonhosted.org/packages/ec/1b/f3a499693956b1220198b0e32d55861f2cc5c5493147496a922c9ce13685/tempsdb-0.6.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7d7d9a3550fc2c6536f42798a3dbb7bf0dc942a0f6609a91dbf3c83294acfc5d",
                "md5": "b97678a3a0329ffcbc22a8b5e3fa21ac",
                "sha256": "c3a78c447f3a290d2157a5a3650ce3d0afff5f07721dc87cd01a590874b3ba60"
            },
            "downloads": -1,
            "filename": "tempsdb-0.6.5-cp39-cp39-manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "b97678a3a0329ffcbc22a8b5e3fa21ac",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*",
            "size": 3544123,
            "upload_time": "2024-04-05T12:20:12",
            "upload_time_iso_8601": "2024-04-05T12:20:12.662489Z",
            "url": "https://files.pythonhosted.org/packages/7d/7d/9a3550fc2c6536f42798a3dbb7bf0dc942a0f6609a91dbf3c83294acfc5d/tempsdb-0.6.5-cp39-cp39-manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-05 12:29:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "smok-serwis",
    "github_project": "tempsdb",
    "travis_ci": true,
    "coveralls": true,
    "github_actions": false,
    "requirements": [],
    "lcname": "tempsdb"
}
        
Elapsed time: 0.33555s