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

GraphQL support / accessor plugin system #29076

Open
maartenbreddels opened this issue Oct 18, 2019 · 2 comments
Open

GraphQL support / accessor plugin system #29076

maartenbreddels opened this issue Oct 18, 2019 · 2 comments
Labels
Enhancement IO Data IO issues that don't fit into a more specific label

Comments

@maartenbreddels
Copy link

I recently added graphql support in vaex (another dataframe library), and just added support for pandas as well: vaexio/vaex#446

However, this is only available after importing vaex.graphql, e.g.:
image

In vaex, I use a plugin system using the entry point system, e.g:

entry_points={
        'vaex.dataframe.accessor': ['graphql = vaex.graphql:DataFrameAccessorGraphQL'],
    },

Is this maybe something pandas can do as well? That would mean that simply installing vaex.graphql would enable this.

Note: in vaex I lazily import the modules, so if df.graphql never gets accessed, vaex.graphql will never be imported.

@maartenbreddels maartenbreddels changed the title GraphQL support / accessor plugin system for GraphQL support / accessor plugin system Oct 18, 2019
@jbrockmendel
Copy link
Member

@datapythonista would this fit into the plugin idea you mentioned elsewhere?

@datapythonista
Copy link
Member

That looks interesting. I don't know much about graphql, and the plugin system I proposed so far is for IO, but I think would be good to have this in pandas.

But the way it's implemented it should be as easy as decorating that function or class to make it a DataFrame accessor I think. That would solve the immediate problem.

And using entry points to extend pandas is surely something we can consider. I'm in my phone, and travelling, so won't be able to have a look in the next few days probably, but if you want to create an issue for that with more details on what you implemented that would be great.

And if you have ideas on how to make extensions compatible both with pandas and vaex, even better.

@jbrockmendel jbrockmendel added IO Data IO issues that don't fit into a more specific label Enhancement labels Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement IO Data IO issues that don't fit into a more specific label
Projects
None yet
Development

No branches or pull requests

3 participants