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

Export key components of the library #85

Merged
merged 8 commits into from
Feb 24, 2023

Conversation

dkulic
Copy link
Contributor

@dkulic dkulic commented Feb 22, 2023

To facilitate ease of use, key components from the library are exported.

For example, imports:

from didcomm.pack_encrypted import pack_encrypted
from didcomm.unpack import unpack
from didcomm.message import Message, Attachment
# ... etc

Can be simplified as this:

from didcomm import pack_encrypted, unpack, Message, Attachment # ... etc

@dkulic dkulic linked an issue Feb 22, 2023 that may be closed by this pull request
@dkulic dkulic requested review from dbluhm and yvgny February 22, 2023 08:32
Copy link
Collaborator

@dbluhm dbluhm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python convention is to have a list __all__ that is a list of strings of the names of the "exported" components. For example: https://github.com/pydantic/pydantic/blob/main/pydantic/__init__.py#L19

Language servers and other development tools look for this value.

@dkulic dkulic merged commit 817a471 into main Feb 24, 2023
@dkulic dkulic deleted the 68-export-key-components-of-the-library branch February 24, 2023 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Export" key components of the library
2 participants