Packages
influx_elixir
0.1.5
0.1.46
0.1.45
0.1.44
0.1.43
0.1.42
0.1.41
0.1.40
0.1.39
0.1.38
0.1.37
0.1.36
0.1.35
0.1.34
0.1.33
0.1.32
0.1.31
0.1.30
0.1.29
0.1.28
0.1.27
0.1.26
0.1.25
0.1.24
0.1.23
0.1.22
0.1.21
0.1.20
0.1.19
0.1.18
0.1.17
0.1.16
0.1.15
0.1.14
0.1.13
0.1.12
0.1.11
0.1.10
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
Elixir client library for InfluxDB v3 with v2 compatibility
Current section
Files
Jump to
Current section
Files
influx_elixir
README.md
README.md
# InfluxElixir
Elixir client library for InfluxDB v3 with v2 compatibility.
## Installation
Add `influx_elixir` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:influx_elixir, "~> 0.1.0"}
]
end
```
## Usage
```elixir
# In your application supervision tree
children = [
{InfluxElixir,
connections: [
default: [
host: "http://localhost:8086",
token: "your-token",
default_database: "my_database"
]
]}
]
```
## Testing
This library ships with `InfluxElixir.Client.Local`, an in-memory InfluxDB
client that enables fast, isolated tests with `async: true` and no external
dependencies. Configure it in `config/test.exs`:
```elixir
config :influx_elixir, :client, InfluxElixir.Client.Local
```
LocalClient enforces an InfluxDB **version profile** matching your production
backend, so your tests fail if you use operations your real InfluxDB doesn't
support:
```elixir
{:ok, conn} = InfluxElixir.Client.Local.start(
databases: ["myapp_test"],
profile: :v3_core
)
```
See the [Testing with LocalClient](testing-with-local-client.html)
guide for full setup instructions, shared case templates, and contract testing.
## Documentation
Full documentation available at [HexDocs](https://hexdocs.pm/influx_elixir).
## License
MIT — see [LICENSE](LICENSE).