• Stars
    star
    25
  • Rank 926,735 (Top 19 %)
  • Language
    Crystal
  • License
    MIT License
  • Created about 8 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

InfluxDB driver for Crystal

InfluxDB.cr

InfluxDB driver for Crystal.

Status: Developer Preview

Working on this from time to time, a lot of missing querying features.

Installation

Add this to your application's shard.yml:

dependencies:
  influxdb:
    github: jeromegn/influxdb.cr

Usage

require "influxdb"

client = InfluxDB::Client.new
db = client.databases["db_name"]

Writing data

There are many ways to write data to influxdb.

Write one data point with a value:

db.write "your_series", 10 # => true
db.write "your_series", InfluxDB::Fields{:a_field => 100, :value => 10000}

Write many data points:

db.write do |points|
  points.write "your_series", 10
  points.write "another_series", 100
  points.write "another_series", 1000, InfluxDB::Tags{:a_tag => "hello"}
end # => true

Write points with fields, tags and a timestamp:

db.write "your_series", InfluxDB::Fields{:a_field => 100, :value => 10000},
  tags: InfluxDB::Tags{:region => "us"}, timestamp: Time.utc

Write a point asynchronously

spawn { db.write "your_series", 10 }

Contributing

  1. Fork it ( https://github.com/jeromegn/influxdb.cr/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • jeromegn Jerome Gravel-Niquet - creator, maintainer

More Repositories

1

Backbone.localStorage

A localStorage adapter for Backbone.js
JavaScript
1,899
star
2

DocumentUp

Pretty documentation generator for Github projects with proper Readme.
Ruby
886
star
3

slang

Slim-inspired templating language for Crystal
Crystal
232
star
4

kilt

Generic template interface for Crystal
Crystal
148
star
5

localtodos

Simple Todos App built on Backbone.js
JavaScript
99
star
6

protobuf.cr

Protobuf generator, encoder and decoder.
Crystal
95
star
7

poutine

MongoDB ORM for Node.js
CoffeeScript
35
star
8

docker.cr

Docker API client in Crystal.
Crystal
26
star
9

bson.cr

BSON implementation written in Crystal
Crystal
24
star
10

v8.cr

V8 bindings for Crystal
C++
16
star
11

dry-types-rails

Dry::Types railties
Ruby
11
star
12

beautifier

A safari extension which smooths fonts!
10
star
13

Warping-Shadow-CSS3

Warping Shadows can be done in CSS3
Ruby
8
star
14

mongol

Light modeling for MongoDB.
JavaScript
8
star
15

jeromegn.github.com

Personal site
HTML
5
star
16

rapid

Redis ORM-ish api for nodejs
JavaScript
3
star
17

backbone.pjax

Backbone utilities for web apps using PJAX.
JavaScript
3
star
18

rhai-tpl

Simple template engine using rhai for logic
Rust
2
star
19

qml.cr

QML library for Crystal
Crystal
2
star
20

quinn-plaintext

QUIC pluggable crypto to use the protocol as plaintext (for use when cryptography is already handled at another layer, e.g. Wireguard)
Rust
1
star
21

delicious-safari-extension

Safari 5.0 Extension: Save URL of current page to Delicious
1
star
22

Radiophonique

Objective-C
1
star
23

containerd-rs

Rust
1
star
24

lg-ultrafine-brightness

Control LG Ultrafine brightness on linux
Rust
1
star
25

documentup.js

experimental DocumentUp running on fly.io
JavaScript
1
star
26

portfolio

My portfolio, built with StaticMatic
JavaScript
1
star
27

node-api-boilerplate

Simple Node.js API server boilerplate using CoffeeScript and Express
CoffeeScript
1
star