Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipython-ngql, a PoC of Jupyter extension to enable nGQL queries like %ngql SHOW SPACES #86

Closed
wey-gu opened this issue Mar 8, 2021 · 9 comments
Labels
type/feature req Type: feature request

Comments

@wey-gu
Copy link
Contributor

wey-gu commented Mar 8, 2021

Dear all,

First, I felt really grateful that you accepted my first PR, thanks so much, it means a lot to me! 😁

When thinking about python ng users, I came to an idea that there could be cases they would like to make queries or tweak data from Jupyter Notebooks, and it turned out there are indeed such things out there for SQL-DB or Cypher.

Thus I spent some time during the weekend creating a PoC on this topic, with which, we could do something like the below image showed to query and manipulate ng's data inside Jupyter notebooks, this enables data scientists to share rerunnable/ readable notebooks with rendered Markdown descriptions, machine learning python codes and results together with nebula graph nGQL querying and results(as human-readable output by default, as image-0), with native python integrations(supports variable in nGQL yields local python variables, as image-1).

image-0, an example of a query in a Jupyter notebook
image-0

image-1, example on local variable rendered in nGQL lines
image-1

The code was put here with more details and it's in a demo shape only (no tests, only tried with a few basic queries). You could try it out(pip install ipython-ngql in your iPython/Jupyter Notes if you promise not to use too fancy queries to break the humble PoC code 😛.

What do you think about this, please? I registered the PyPi name as ipython-ngql while if the plan is going to use it as this separate package, I will hand over the ownership to the community. Or maybe it's possible to consider implementing this in the nebula-python repo itself and not only support %ngql <query> but also %opencypher <query> in the future 😉.

Thanks a lot!
BR//Wey

@wey-gu wey-gu changed the title ipython-ngql, a PoC of Jupyter extension ipython-ngql, a PoC of Jupyter extension to enable nGQL queries like %ngql SHOW SPACES Mar 8, 2021
@wey-gu wey-gu changed the title ipython-ngql, a PoC of Jupyter extension to enable nGQL queries like %ngql SHOW SPACES ipython-ngql, a PoC of Jupyter extension to enable nGQL queries like %ngql SHOW SPACES Mar 8, 2021
@whitewum
Copy link
Contributor

whitewum commented Mar 8, 2021

Great! I like it very much.

Notebook support is more friendly for data scientists.

As well as networkx.

@wey-gu
Copy link
Contributor Author

wey-gu commented Mar 8, 2021

Great! I like it very much.

Notebook support is more friendly for data scientists.

As well as networkx.

Thanks Min!

Wow, networkX is next level, now I come to know using nX is the best practice for data scientists here already☺️.

@laura-ding
Copy link
Contributor

@wey-gu Thanks for your contribution! The idea is feasible. But it's the same work of console, I don't think It is necessary to do it, because the data format is the reduce work. and use this, it needs to download so many dependencies.
We will plan to provide something like Py2neo. Do you interested in contributing to this?

@wey-gu
Copy link
Contributor Author

wey-gu commented Mar 9, 2021

@wey-gu Thanks for your contribution! The idea is feasible. But it's the same work of console, I don't think It is necessary to do it, because the data format is the reduce work. and use this, it needs to download so many dependencies.
We will plan to provide something like Py2neo. Do you interested in contributing to this?

Dear Laura,

Thanks a lot! Sure, agreed it's too heavy yet with little gain for bringing it to the nebula-python repo. I will leave it as it is in my own repo and PyPI for now, maybe put some free time on polishing it in case someone would like to use it/ or even contribute to it, too.

Regarding the Py2neo-like package, the plan will be more CLI tool part right? I was thinking of creating something like iRedis, an interactive CLI client for ng, is it similar to the plan? Either way, as a CLI enthusiast, yes, I am for sure interested in contributing to it! ☺️

We can have a further talk via Slack or? It's ok to close this issue!

Thanks again~
BR, Wey

@whitewum
Copy link
Contributor

Py2neo

is much more like an ORM SDK.

@wey-gu
Copy link
Contributor Author

wey-gu commented Mar 10, 2021

Py2neo

is much more like an ORM SDK.

Thanks, Min, got it :). nebula python ORM is much more meaningful for the python SDK field.

@laura-ding
Copy link
Contributor

@wey-gu Thanks for your contribution! The idea is feasible. But it's the same work of console, I don't think It is necessary to do it, because the data format is the reduce work. and use this, it needs to download so many dependencies.
We will plan to provide something like Py2neo. Do you interested in contributing to this?

Dear Laura,

Thanks a lot! Sure, agreed it's too heavy yet with little gain for bringing it to the nebula-python repo. I will leave it as it is in my own repo and PyPI for now, maybe put some free time on polishing it in case someone would like to use it/ or even contribute to it, too.

Regarding the Py2neo-like package, the plan will be more CLI tool part right? I was thinking of creating something like iRedis, an interactive CLI client for ng, is it similar to the plan? Either way, as a CLI enthusiast, yes, I am for sure interested in contributing to it! ☺️

We can have a further talk via Slack or? It's ok to close this issue!

Thanks again~
BR, Wey

@wey-gu Thanks very much for your attention to it. We will collect the requirement and write the design into the document, and then put it out to share. I am very glad that you can join in in the future.

@wey-gu
Copy link
Contributor Author

wey-gu commented Mar 16, 2021

Dear @laura-ding

@wey-gu Thanks very much for your attention to it. We will collect the requirement and write the design into the document, and then put it out to share. I am very glad that you can join in in the future.

Got it, thanks! :-D

@Sophie-Xie Sophie-Xie added the type/feature req Type: feature request label Sep 28, 2021
@wey-gu
Copy link
Contributor Author

wey-gu commented Mar 21, 2024

iPython-nGQL is no longer a PoC, it's actively maintained!
Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature req Type: feature request
Projects
None yet
Development

No branches or pull requests

4 participants