PyPI package: https://pypi.org/project/grakn-client
Documentation: https://dev.grakn.ai/docs/client-api/python
Distribution
Now officially available through https://pypi.org
pip install grakn-client
Or you can upgrade your local installation with:
pip install -U grakn-client
Architecture
The architecture for client-python has been refactored to align with other client drivers and split out of grakn-core.
- New package-name: `grakn-client`
- The main class `Grakn` is now called `GraknClient`
- `GraknClient` and `DataType` now live under `grakn.client` -- import
from grakn.client import GraknClient
- The client-python module now has its own repository (hit star on [graknlabs/client-python](https://github.com/graknlabs/client-python)!). This allows us to iterate on client-python more flexibly, independent of grakn-core.
API
- The client-python library now works for both Python 2 and 3.
- Replaced `enum34` with `enum-compat` to make client-python compatible with Python 3.4+
- Opening a transaction is now done by:
- Read: `session.transaction().read()`
- Write: `session.transction().write()`
- In addition to calling `transaction.close()` at the end of a transaction, `session.close()` at the end of a session, now you should also call `client.close()` at the end of using the database to close the actual HTTP2 connection to the server.