Skip to content

Each provider must contain metadata for internal usage #621

@lk-geimfari

Description

@lk-geimfari

Each provider must contain metadata for internal usage. We currently use such data on creating a custom provider, but we need to add Meta for all providers.

It will look like this:

class MyProvider(BaseProvider):
    class Meta:
        name = 'my_provider'
    
    def hi():
        return 'Hi'

To use it in the schema and generic like this:

>>> generic.add_provider(MyProvider)
>>> generic.my_provider.hi()

Related issue: #619

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions