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

New SDK structure #214

Merged
merged 5 commits into from
Dec 21, 2023
Merged

New SDK structure #214

merged 5 commits into from
Dec 21, 2023

Conversation

MarshalX
Copy link
Owner

@MarshalX MarshalX commented Dec 19, 2023

not sure yet about it. new structure solves depending on the root package. for example on the old structure codegen depends on xrpc_client models... that codegen generates... (because of import aliases in the root package)

this PR breaks compatibility. update of imports are required

instead of from atproto.firehose import ... now we must use from atproto_firehose import ... (replace . to _)

some of aliases provided by atproto package:

__all__ = [
    'AsyncClient',
    'Client',
    'models',
    'CAR',
    'CID',
    'CIDType',
    'NSID',
    'AtUri',
    'AsyncFirehoseSubscribeLabelsClient',
    'AsyncFirehoseSubscribeReposClient',
    'FirehoseSubscribeLabelsClient',
    'FirehoseSubscribeReposClient',
    'parse_subscribe_labels_message',
    'parse_subscribe_repos_message',
    'firehose_models',
]

it means that imports like from atproto import Client will work fine without changes

new (completely different packages at the top of project):
image

old (one root package called "atproto" and many modules):
image

@MarshalX MarshalX marked this pull request as ready for review December 21, 2023 17:22
@MarshalX MarshalX merged commit 6de3060 into main Dec 21, 2023
25 checks passed
@MarshalX MarshalX deleted the new-sdk-structure branch December 21, 2023 17:24
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.

1 participant