The Tiny Time-Series Database Optimized for Your Happiness


Keywords
database, iot, time-series, time-series-database
License
MIT
Install
pip install tinyflux==1.0.0

Documentation

image

image

TinyFlux is the tiny time series database optimized for your happiness :)

TinyFlux is a time series version of TinyDB that is also written in Python and has no external dependencies. It's a great companion for small analytics workflows and apps, as well as at-home IOT data stores. TinyFlux has 100% test coverage, over 50,000 downloads, and no open issues.

Build Status Coverage Version Downloads

Quick Links

Installation

TinyFlux is hosted at PyPI and is easily downloadable with pip. TinyFlux has been tested with Python 3.7 - 3.12 and PyPy-3.9 on Linux and Windows platforms.

Introduction

TinyFlux is:

  • time-centric: Python datetime objects are first-class citizens and queries are optimized for time, above all else.
  • optimized for your happiness: TinyFlux is designed to be simple and fun to use by providing a simple and clean API that can be learned in 5 minutes.
  • tiny: The current source code has 4,000 lines of code (with about 50% documentation) and 4,000 lines of tests. TinyFlux is about 150kb, unzipped.
  • written in pure Python: TinyFlux needs neither an external server nor any dependencies.
  • works on Python 3.7+ and PyPy-3.9: TinyFlux works on all modern versions of Python and PyPy.
  • 100% test coverage: No explanation needed.

To get started, head over to the TinyFlux docs. Examples can be found in the examples directory. You can also discuss topics related to TinyFlux including general development, extensions, or showcase your TinyFlux-based projects on the GitHub discussion forum.

Example Code Snippets

Writing to TinyFlux

Querying TinyFlux

Full Example Notebooks and Workflows

The examples directory of this repository contains three common uses cases for TinyFlux and the associated boilerplate to get you started:

  1. Loading a TinyFlux DB from a CSV
  2. Local Analytics Workflow with a TinyFlux Database
  3. TinyFlux as a MQTT Datastore for IoT Devices
  4. TinyFlux at the Edge (with Backup Strategy)

Tips

Checkout some tips for working with TinyFlux here.

TinyFlux Across the Internet

Articles, tutorials, and other instances of TinyFlux:

Contributing

New ideas, new developer tools, improvements, and bugfixes are always welcome. Follow these guidelines before getting started:

  1. Make sure to read Getting Started and the Contributing Tooling and Conventions section of the documentation.
  2. Check GitHub for existing open issues, open a new issue or start a new discussion.
  3. To get started on a pull request, fork the repository on GitHub, create a new branch, and make updates.
  4. Write unit tests, ensure the code is 100% covered, update documentation where necessary, and format and style the code correctly.
  5. Send a pull request.