Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/florinpatrascu/neo4j_sips
Elixir driver for the Neo4j graph database server
https://github.com/florinpatrascu/neo4j_sips
driver elixir elixir-driver elixir-lang graph-database graphdb neo4j
Last synced: 3 days ago
JSON representation
Elixir driver for the Neo4j graph database server
- Host: GitHub
- URL: https://github.com/florinpatrascu/neo4j_sips
- Owner: florinpatrascu
- License: mit
- Created: 2015-10-12T17:24:07.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-03-03T20:22:53.000Z (almost 5 years ago)
- Last Synced: 2025-01-02T09:12:36.608Z (10 days ago)
- Topics: driver, elixir, elixir-driver, elixir-lang, graph-database, graphdb, neo4j
- Language: Elixir
- Size: 158 KB
- Stars: 81
- Watchers: 9
- Forks: 22
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Neo4j driver for Elixir. (ORM and Datamapping)
- fucking-awesome-elixir - neo4j_sips - Neo4j driver for Elixir. (ORM and Datamapping)
- awesome-elixir - neo4j_sips - Neo4j driver for Elixir. (ORM and Datamapping)
README
## Neo4j.Sips
A simple Elixir driver using the [Neo4j](http://neo4j.com/developer/get-started/) graph database REST API. Compatible with the following Neo4j servers: `2.x/3.0.x/3.1.x`
![Build Status](https://travis-ci.org/florinpatrascu/neo4j_sips.svg?branch=master)
[![Deps Status](https://beta.hexfaktor.org/badge/all/github/florinpatrascu/neo4j_sips.svg)](https://beta.hexfaktor.org/github/florinpatrascu/neo4j_sips)
[![Hex.pm](https://img.shields.io/hexpm/dt/neo4j_sips.svg?maxAge=2592000)](https://hex.pm/packages/neo4j_sips)
[![Hexdocs.pm](https://img.shields.io/badge/api-hexdocs-brightgreen.svg)](https://hexdocs.pm/neo4j_sips)Documentation: [hexdocs.pm/neo4j_sips/](http://hexdocs.pm/neo4j_sips/)
*You can also look at: [Bolt.Sips](https://github.com/florinpatrascu/bolt_sips) - Elixir driver using the Bolt protocol; Neo4j's newest network protocol, designed for high-performance.*
### Install
[Available in Hex](https://hex.pm/packages/neo4j_sips). Edit the `mix.ex` file and add the `neo4j_sips` dependency to the `deps/1 `function:
def deps do
[{:neo4j_sips, "~> 0.2"}]
endor from Github:
def deps do
[{:neo4j_sips, github: "florinpatrascu/neo4j_sips"}]
endIf you're using a local development copy:
def deps do
[{:neo4j_sips, path: "../neo4j_sips"}]
endThen add the `neo4j_sips` dependency the applications list:
def application do
[applications: [:logger, :neo4j_sips],
mod: {Neo4j.Sips.Application, []}]
endEdit the `config/config.exs` and describe a Neo4j server endpoint, example:
config :neo4j_sips, Neo4j,
url: "http://localhost:7474",
pool_size: 5,
max_overflow: 2,
timeout: 15_000 # milliseconds!Run `mix do deps.get, deps.compile`
If your server requires basic authentication, add this to your config file:
basic_auth: [username: "foo", password: "bar"]
Or:
token_auth: "bmVvNGo6dGVzdA==" # if using an authentication token?!You can also specify the authentication in the `url` config:
url: "http://neo4j:neo4j@localhost:7474"
### ExampleWith a minimalist setup configured as above, and a Neo4j server running, we can connect to the server and run some queries using Elixir’s interactive shell ([IEx](http://elixir-lang.org/docs/stable/iex/IEx.html)):
$ cd
$ iex -S mix
Erlang/OTP 19 [erts-8.0.2] [source] [64-bit] ...Interactive Elixir (1.3.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> alias Neo4j.Sips, as: Neo4jiex(2)> Neo4j.start_link(url: "http://localhost:7474")
{:ok, #PID<0.204.0>}iex(3)> cypher = """
CREATE (n:Neo4jSips {title:'Elixir sipping from Neo4j', released:2015,
license:'MIT', neo4j_sips_test: true})
"""iex(4)> Neo4j.query(Neo4j.conn, cypher)
{:ok, []}iex(5)> n = Neo4j.query!(Neo4j.conn, "match (n:Neo4jSips {title:'Elixir sipping from Neo4j'}) where n.neo4j_sips_test return n")
[%{"n" => %{"license" => "MIT", "neo4j_sips_test" => true, "released" => 2015,
"title" => "Elixir sipping from Neo4j"}}]
For more examples, see the test suites.### Contributing
- [Fork it](https://github.com/florinpatrascu/neo4j_sips/fork)
- Create your feature branch (`git checkout -b my-new-feature`)
- Test (`mix test`)
- Commit your changes (`git commit -am 'Add some feature'`)
- Push to the branch (`git push origin my-new-feature`)
- Create new Pull Request### Contributors
As reported by Github: [contributions to master, excluding merge commits](https://github.com/florinpatrascu/neo4j_sips/graphs/contributors)
### Author
Florin T.PATRASCU (@florinpatrascu, @florin on Twitter)## License
* Neo4j.Sips - MIT, check [LICENSE](LICENSE) file for more information.
* Neo4j - Dual free software/commercial license, see http://neo4j.org/