Comments (5)
Just adding another comment here as Python 3.10 is shipping in more distros, and FaunaDB is the last dependency in several projects of mine to support it...
from faunadb-python.
I've replaced hyper with httpx in my fork and it seems to work.
doc = client.query(q.get(q.ref(q.collection("customers"), "101")))
indexes = client.query(q.paginate(q.indexes()))
options = {"fields": ["document", "diff", "action"]}
stream = client.stream(doc["ref"], options, on_start, on_error, on_version)
stream.start()
@robertcsapo ➜ /workspaces/faunadb-python (httpx ✗) $ python example.py
started stream at 1642450065838000
on_version event at 1642450066010000
Event action: update
Changes made: None
on_version event at 1642450080180000
Event action: update
Changes made: {'lastName': 'GitHub'}
https://github.com/robertcsapo/faunadb-python/blob/httpx/faunadb/streams/client.py
from faunadb-python.
For those who need this to work until it gets supported. you can add the following before your fauna imports
import collections.abc
collections.Iterable = collections.abc.Iterable
collections.Mapping = collections.abc.Mapping
collections.MutableSet = collections.abc.MutableSet
collections.MutableMapping = collections.abc.MutableMapping
from faunadb-python.
Probably not recommended, but here is a workaround I used to get fauna working on my dev (not production) script. Commented out line 12 from the file ..REDACTED/site-packages/faunadb/streams. #from hyper import HTTP20Connection. Probably will impact other functions, but did make it past the error with collections so far.
from faunadb-python.
Thanks @robertcsapo for the contribution 👏 , apologies all for the delay on official support. It's been added in 4.5.0
Let us know if any issues are encountered during usage.
from faunadb-python.
Related Issues (20)
- why raising errors? HOT 6
- Is async implementation in the roadmap of this library? HOT 3
- version 4.0.0 of the driver is not stable HOT 2
- List of Illegal Characters HOT 3
- Valid JSON returns faunadb.errors.BadRequest: document data is not valid. HOT 1
- Example Documentation for Lambdas HOT 5
- test HOT 1
- select() cannot use None as the default parameter HOT 1
- Usage with Django ORM HOT 4
- Is there a guide for using the temporality features HOT 1
- Poetry fails to install faunadb HOT 1
- TypeError: catching classes that do not inherit from BaseException is not allowed
- Hyper deprecation HOT 1
- Expose response headers from RequestResult HOT 1
- Cant get all documents from faunadb query HOT 2
- Get query read/write/... metrics HOT 4
- Fauna version upgrade message provides invalid link HOT 2
- Make the _json utilities public HOT 1
- Catch and handle database 409 errors as a special case HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faunadb-python.