Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.1.89 instead.
Reason given by maintainers: Replaced by new zef 0.2+ (different project)

A data-oriented toolkit for graph data

versioned graphs + streams + query using Python + GraphQL

Workflow status badge

Docs   |   Blog   |   Chat   |   ZefHub


gif showing Zef demo intro


Description

Zef is an open source, data-oriented toolkit for graph data. It combines the access speed and local development experience of an in-memory data structure with the power of a fully versioned, immutable database (and distributed persistence if needed with ZefHub). Furthermore, Zef includes a library of composable functional operators, effects handling, and native GraphQL support. You can pick and choose what you need for your project.

If any of these apply to you, Zef might help:

  • I need a graph database with fast query speeds and hassle-free infra
  • I need a graph data model that's more powerful than NetworkX but easier than Neo4j
  • I need to "time travel" and access past states easily
  • I like Datomic but prefer something open source that feels like working with local data structures
  • I would prefer querying and traversing directly in Python, rather than a query language (like Cypher or GSQL)
  • I need a GraphQL API that's easy to spin up and close to my data model


Features

  • a graph language you can use directly in Python code
  • fully versioned graphs
  • in-memory access speeds
  • free and real-time data persistence (via ZefHub)
  • work with graphs like local data structures
  • no separate query language
  • no ORM
  • GraphQL API with low impedance mismatch to data model
  • data streams and subscriptions


Status

Zef is currently in Public Alpha.

  • Private Alpha: Testing Zef internally and with a closed group of users.
  • Public Alpha: Anyone can use Zef but please be patient with very large graphs!
  • Public Beta: Stable enough for most non-enterprise use cases.
  • Public: Stable for all production use cases.


Installation

The platforms we currently support are 64-bit Linux and MacOS. The latest version can be installed via the PyPI repository using:

pip install zef

This will attempt to install a wheel if supported by your system and compile from source otherwise. See INSTALL for more details if compiling from source.

Check out our installation doc for more details about getting up and running once installed.



Using Zef

Here's some quick points to get going. Check out our Quick Start and docs for more details.

A quick note, in Zef, we overloaded the "|" pipe so users can chain together values, Zef operators (ZefOps), and functions in sequential, lazy, and executable pipelines where data flow is left to right.


💆 Get started 💆

from zef import *          # these imports unlock user friendly syntax and powerful Zef operators (ZefOps)
from zef.ops import *

g = Graph()                # create an empty graph

🌱 Add some data 🌱

p1 = ET.Person | g | run                  # add an entity to the graph

(p1, RT.FirstName, "Yolandi") | g | run   # add "fields" via relations triples: (source, relation, target)

🐾 Traverse the graph 🐾

p1 | Out[RT.FirstName]         # one hop: step onto the relation

p1 | out_rel[RT.FirstName]     # two hops: step onto the target

⏳ Time travel ⌛

p1 | time_travel[-2]                                           # move reference frame back two time slices

p1 | time_travel[Time('2021 December 4 15:31:00 (+0100)')]     # move to a specific date and time

👐 Share with other users (via ZefHub) 👐

g | sync[True] | run                            # save and sync all future changes on ZefHub

# ---------------- Python Session A (You) -----------------
g | uid | to_clipboard | run                    # copy uid onto local clipboard

# ---------------- Python Session B (Friend) -----------------
graph_uid: str = '...'                          # uid copied from Slack/WhatsApp/email/etc
g = Graph(graph_uid)
g | now | all[ET] | collect                     # see all entities in the latest time slice

🚣 Choose your own adventure 🚣


📌 A note on ZefHub 📌

Zef is designed so you can use it locally and drop it into any existing project. You have the option of syncing your graphs with ZefHub, a service that persists, syncs, and distributes graphs automatically (and the company behind Zef). ZefHub makes it possible to share graphs with other users and see changes live, by memory mapping across machines in real-time!

You can create a ZefHub account for free which gives you full access to storing and sharing graphs forever. For full transparency, our long-term hope is that many users will get value from Zef or Zef + ZefHub for free, while ZefHub power users will pay a fee for added features and services.



Roadmap

We want to make it incredibly easy for developers to build fully distributed, reactive systems with consistent data and cross-language (Python, C++, Julia) support. If there's sufficient interest, we'd be happy to share a public board of items we're working on.



Contributing

Thank you for considering contributing to Zef! We know your time is valuable and your input makes Zef better for all current and future users.

To optimize for feedback speed, please raise bugs or suggest features directly in our community chat https://zef.chat.

Please refer to our CONTRIBUTING file and CODE_OF_CONDUCT file for more details.



License

Zef is licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0



Dependencies

The compiled libraries make use of the following packages:

Metadata

Release files for zef 0.16.3.post11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zef 0.16.3.post11
File Size Uploaded Provenance
zef-0.16.3.post11.tar.gz 690.5 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for zef 0.16.3.post11
File
zef-0.16.3.post11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
zef-0.16.3.post11-cp311-cp311-macosx_10_15_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.15+ x86-64 Details
zef-0.16.3.post11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
zef-0.16.3.post11-cp310-cp310-macosx_10_15_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.15+ x86-64 Details
zef-0.16.3.post11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
zef-0.16.3.post11-cp39-cp39-macosx_10_15_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.15+ x86-64 Details
zef-0.16.3.post11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
zef-0.16.3.post11-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details

Total release size: 42.1 MB

Release files / zef-0.16.3.post11.tar.gz

Download URL zef-0.16.3.post11.tar.gz
Size 690.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ebe0300fbb9555cda336254afb1225815f740c3aafb5bd0c3dfca6246578c985
BLAKE2b-256 checksum
How to use checksums
5454b4fcc1819d89356b4e4e9b3aab58f3676906e5828e0843d631da72a43f8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / zef-0.16.3.post11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL zef-0.16.3.post11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 5.4 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
f4e89d3e17487c18511be99ffe9a25480a6646cdb902d8a4c2d65d5b746731ec
BLAKE2b-256 checksum
How to use checksums
0b663189985548edff53443bbc888540f9e6843c95510454f58254bcaf0fa562
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / zef-0.16.3.post11-cp311-cp311-macosx_10_15_x86_64.whl

Download URL zef-0.16.3.post11-cp311-cp311-macosx_10_15_x86_64.whl
Size 4.9 MB
Tags CPython 3.11 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
36463f73fd1b28cb7c6b62ba4f0003715c55ae2a6dc36bef683e74cff03f5382
BLAKE2b-256 checksum
How to use checksums
0274aa5b1b73a34141164321702bb74c4ad0733491e0a5b87ec7fc3a4c2aa41a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / zef-0.16.3.post11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL zef-0.16.3.post11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 5.4 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
17e63491da7e7b1b405f4239f602383494723aa64106e5a87ce5fb556b7538eb
BLAKE2b-256 checksum
How to use checksums
4300ca5753507532e328c12f5271b17f5c8aec9c95e99ff98251c0d2d745f1d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / zef-0.16.3.post11-cp310-cp310-macosx_10_15_x86_64.whl

Download URL zef-0.16.3.post11-cp310-cp310-macosx_10_15_x86_64.whl
Size 4.9 MB
Tags CPython 3.10 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
23da65dfd0df7d72f57b06105bffa0d683d185e1f4dee3f4c0e08fed90421158
BLAKE2b-256 checksum
How to use checksums
834b24d607349f451b863c8c58fee8b7ea63525ea1c001fb85e86b2969bca057
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / zef-0.16.3.post11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL zef-0.16.3.post11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 5.4 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
094fa3a72062b972ad356dead4588a783349c6e601f3b315554dffa0d9a02cfd
BLAKE2b-256 checksum
How to use checksums
881bd970ebfb4db63b8e11374d605a2e83ba65584a56cfbb270415eec78d6a42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / zef-0.16.3.post11-cp39-cp39-macosx_10_15_x86_64.whl

Download URL zef-0.16.3.post11-cp39-cp39-macosx_10_15_x86_64.whl
Size 4.9 MB
Tags CPython 3.9 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
4c2a5eb018d8e345a0f70f6a8d62ea07d947ca70bef1f08a520f73e37a0b19b3
BLAKE2b-256 checksum
How to use checksums
971845d26d7786e87ecd1f7f3f078ac8a8e45a1185b6a16155ef87f0554d7a75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / zef-0.16.3.post11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL zef-0.16.3.post11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 5.4 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
f63b32a2827370da2118f25b1cfc3fa70bec27ce8da56f63752ef6679dbad1a9
BLAKE2b-256 checksum
How to use checksums
cad91e338e5294dcf5c7d7bb2992095562a3914fef0c1afcfa817f876f75a63e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / zef-0.16.3.post11-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL zef-0.16.3.post11-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 5.4 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
99bbeda4fd982c464732d692079933b058805f32b07c61e34c1a28fe8f3d1390
BLAKE2b-256 checksum
How to use checksums
6d514c34167a975e90386a729086e6f6404e29b2be616270c4ec013a9dd3e978
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Security for zef 0.16.3.post11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page