Code Monkey home page Code Monkey logo

datetime_event_store's Introduction

datetime_event_store

Horodatage storage pakage

install :

clone datetime_event_store in your project :

git clone http://github.com/qrames/datetime_event_store

On your Postgres database install and configure TimescaleDB

Your_db=# CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;
ATTENTION:  
WELCOME TO
 _____ _                               _     ____________  
|_   _(_)                             | |    |  _  \ ___ \
  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ /
  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \
  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /
  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
               Running version 1.3.1
For more information on TimescaleDB, please visit the following links:

 1. Getting started: https://docs.timescale.com/getting-started
 2. API reference documentation: https://docs.timescale.com/api
 3. How TimescaleDB is designed: https://docs.timescale.com/introduction/architecture

Note: TimescaleDB collects anonymous reports to better understand and assist our users.
For more information and how to disable, please see our docs https://docs.timescaledb.com/using-timescaledb/telemetry.

CREATE EXTENSION

configure your database in db_config.json

{
    "host":"localhost",
    "database": "your_database",
    "user": "your_username",
    "password": "your_password",
}

in your database create the table

CREATE TABLE events (
  time        TIMESTAMPTZ       NOT NULL,
  event        TEXT              NOT NULL
);
SELECT create_hypertable('events', 'time');

Method store event

class DatetimeEventStore :

    def store_event(*args, **kwargs):
        date = kwargs['at']
        data = kwargs['data']
        ...

Method

class DatetimeEventStore :

    def get_events(*args, **kwargs) :
        start = kwargs['start']
        end = kwargs['end']
        ...
        return enventsListe

datetime_event_store's People

Contributors

qrames avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.