https://github.com/nebula-contrib/nebulagraph-lite
The minimal, ad-hoc way of plug and play NebulaGraph with pip install, even inside Colab Notebook!
https://github.com/nebula-contrib/nebulagraph-lite
colab graphdatabase nebulagraph
Last synced: about 1 year ago
JSON representation
The minimal, ad-hoc way of plug and play NebulaGraph with pip install, even inside Colab Notebook!
- Host: GitHub
- URL: https://github.com/nebula-contrib/nebulagraph-lite
- Owner: nebula-contrib
- License: apache-2.0
- Created: 2024-01-10T08:56:17.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-24T05:49:09.000Z (about 2 years ago)
- Last Synced: 2025-06-12T18:16:28.397Z (about 1 year ago)
- Topics: colab, graphdatabase, nebulagraph
- Language: Python
- Homepage:
- Size: 1.26 MB
- Stars: 17
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
NebulaGraph Lite
Try NebulaGraph with `pip install`, on Linux/ WSL2 or even [Google Colab](https://colab.research.google.com/github/nebula-contrib/nebulagraph-lite/blob/main/examples/NebulaGraph_Lite.ipynb) or [ModelScope Notebook](https://modelscope.cn/my/mynotebook/preset), in container, rootless.
[](https://colab.research.google.com/github/nebula-contrib/nebulagraph-lite/blob/main/examples/NebulaGraph_Lite.ipynb)
[](https://github.com/nebula-contrib/nebulagraph-lite/blob/main/examples/NebulaGraph_Lite.ipynb)
[](https://github.com/nebula-contrib/nebulagraph-lite/blob/main/examples/NebulaGraph_Lite.ipynb)
[](https://github.com/vesoft-inc/nebula)
[](https://pdm.fming.dev)
[](https://github.com/nebula-contrib/nebulagraph-lite/releases)
[](https://pypi.org/project/nebulagraph-lite/)
[](https://www.python.org/)
[](https://github.com/nebula-contrib/nebulagraph-lite/actions/workflows/release.yaml)
## How to use
> Install NebulaGraph Lite
```bash
pip3 install nebulagraph-lite
```
> Start NebulaGraph Lite
From Jupyter Notebook: From CLI:
```python
from nebulagraph_lite import nebulagraph_let as ng_let
n = ng_let()
n.start()
```
```bash
nebulagraph start
```
Voilà ! It'ts up and running already now!
## Free NebulaGraph Playground in 5 minutes
> Thanks to [Google Colab](https://colab.research.google.com/) and [ModelScope Notebook](https://modelscope.cn/my/mynotebook/preset), we could have a free NebulaGraph playground in 5 minutes.
Go with 👉 [](https://colab.research.google.com/github/nebula-contrib/nebulagraph-lite/blob/main/examples/NebulaGraph_Lite.ipynb).
In China?
Go with 👉 [](https://github.com/nebula-contrib/nebulagraph-lite/blob/main/examples/NebulaGraph_Lite.ipynb)
## What's next
Play with `nebula3-python` or [jupyter-nebulagraph](https://jupyter-nebulagraph.readthedocs.io) and walk through the [Documentation](https://docs.nebula-graph.io/)!
```bash
pip3 install jupyter-nebulagraph
%load_ext ngql
```
And we could access it like:
```python
%ngql --address 127.0.0.1 --port 9669 --user root --password nebula
```
And query like:
```python
%ngql SHOW HOSTS;
```
## Other non-lite or less-lite options
Intrested in other play or production options?
### Production
- [Binary Packages](https://www.nebula-graph.io/download), if running on bare OS.
- [K8s Operator](https://github.com/vesoft-inc/nebula-operator), on K8s.
- [NebulaGrpah Cloud](https://www.nebula-graph.io/cloud), the managed NebulaGraph service.
### Play and Dev
- [Docker Compose](https://github.com/vesoft-inc/nebula-docker-compose), if you are comfortable to play with Docker on single server.
- [nebula-up](https://github.com/nebula-contrib/nebula-up), one-liner test env installer on single server, support studio, dashboard, nebulagraph algorithm, exchange etc, all-in-one.
- [Docker Extension](https://github.com/nebula-contrib/nebulagraph-docker-ext), one-click on Docker Desktop(macOS, windows) on desktop machines, in GUI flavor.
- [Nebula-Operator-KinD](https://github.com/nebula-contrib/nebula-operator-kind), Nebula K8s Operator with K8s-in-Docker, one-liner test env with docker+k8s+nebulagrpah-operator, try NebulaGraph on K8s with ease on your single server.
## Acknowledgements
- udocker, https://github.com/indigo-dc/udocker, the foundation of this project
- Fakechroot, https://github.com/dex4er/fakechroot, the engine runs MetaD and StorageD
- PRoot, https://proot-me.github.io, the engine runs GraphD and Console
- docker-in-colab, https://github.com/drengskapur/docker-in-colab, inspired our Colab capablity
- NebulaGraph Docker, https://github.com/vesoft-inc/nebula-docker-compose, the container images we leveraged
## Supported Platforms
[](https://github.com/nebula-contrib/nebulagraph-lite)
[](https://colab.research.google.com/github/nebula-contrib/nebulagraph-lite/blob/main/examples/NebulaGraph_Lite.ipynb)
[](https://github.com/nebula-contrib/nebulagraph-lite/blob/main/examples/NebulaGraph_Lite.ipynb)
[](https://github.com/nebula-contrib/nebulagraph-lite)
[](https://github.com/nebula-contrib/nebulagraph-lite)
[](https://github.com/nebula-contrib/nebulagraph-lite)
## FAQ
Click to see FAQ
### Why not docker?
With udocker, the opinionated subset docker running in user space, we could run docker images without root privilege, docker daemon.
Thus we support running inside docker container, WSL2, Google Colab.
### Can NebulaGraph-Lite run inside a container?
Yes! Say we are in a container that runs Ubuntu, we could run:
```bash
docker run -it --rm ubuntu:latest bash
# inside the container
apt update && apt install python3-pip curl -y
pip3 install nebulagraph-lite
python3
```
In python3:
```python
from nebulagraph_lite import nebulagraph_let as ng_let
n = ng_let(in_container=True)
n.start()
```
Or in shell:
```bash
nebulagraph --container start
```
### Does it support Windows?
Yes, it supports Windows with WSL2 or other Linux VMs with a Hypervisor.
### How to clean up?
- Step 1, from nebulagraph-lite, remove the udocker container and clean up the base path.
Python:
```python
n.stop()
n.clean_up()
```
Shell:
```bash
nebulagraph stop
nebulagraph cleanup
```
- Step 2, pip uninstall nebulagraph-lite and dependencies.
```bash
pip3 uninstall nebulagraph-lite udocker
```
- Step 3, remove the udocker files.
```bash
rm -rf ~/.udocker
```