Giter Club home page Giter Club logo

aioneo4j's Introduction

aioneo4j

info:asyncio client for neo4j

Installation

pip install aioneo4j

Usage

import asyncio

from aioneo4j import Neo4j


async def go():
    async with Neo4j('http://neo4j:[email protected]:7474/') as neo4j:
        data = await neo4j.data()
        assert bool(data)


loop = asyncio.get_event_loop()
loop.run_until_complete(go())
loop.close()

aioneo4j's People

Contributors

asvetlov avatar dependabot[bot] avatar froosty avatar hellysmile avatar hzlmn avatar litwisha avatar pcinkh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aioneo4j's Issues

TypeError: timeout() got an unexpected keyword argument 'loop'

usage example doesn't work

import asyncio

from aioneo4j import Neo4j


async def go():
    async with Neo4j('http://neo4j:[email protected]:7474/') as neo4j:
        data = await neo4j.data()
        assert bool(data)


loop = asyncio.get_event_loop()
loop.run_until_complete(go())
loop.close()

got exception:

  File "venv/lib/python3.8/site-packages/aioneo4j/client.py", line 56, in data
    _, data = await self.transport.perform_request(
  File "venv/lib/python3.8/site-packages/aioneo4j/transport.py", line 149, in perform_request
    with async_timeout.timeout(_request_timeout, loop=self.loop):
TypeError: timeout() got an unexpected keyword argument 'loop'
sys:1: RuntimeWarning: coroutine 'Transport._perform_request' was never awaited

replace with async_timeout.timeout(_request_timeout, loop=self.loop) -> with async_timeout.timeout(_request_timeout) fixed this error

TypeError when I try to use Client's cypher method.

 File "venv/lib/python3.7/site-packages/aioneo4j/client.py", line 85, in cypher
    request_timeout=request_timeout,
  File "venv/lib/python3.7/site-packages/aioneo4j/transport.py", line 138, in perform_request
    _url = self.url / path
  File "venv/lib/python3.7/site-packages/yarl/_url.py", line 322, in __truediv__
    name = self._PATH_QUOTER(name)
  File "yarl/_quoting_c.pyx", line 213, in yarl._quoting_c._Quoter.__call__
TypeError: Argument should be str

I've tried url = "http//user:pass@localhost:7474/" and
url = "http//localhost:7474/" and aioneo4j.Neo4j(url=self.url, auth=("user", "pass"))
but get the same error both times

Thanks in advance!

Bolt?

I saw in the Client class url='http://127.0.0.1:7474/',
Does this library support the bolt protocol?

I was hoping to use this in conjunction with neomodel which is where I've defined a lot of the graph structures. My stack is neo4j | neomodel | graphene | aiohttp (primarilly over websockets)

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.