Change Log#

Version 0.0.30#


  • Add Python 3.12; migrate from black to ruff format by @MarshalX in

  • Async Firehose Client: block on make message handler call, add on error callback by @DXsmiley in

  • Downgrade sphinxext-opengraph to clean up the tree of dependencies (including vulnerable) by @MarshalX in

  • Update lexicons fetched from 46b108c committed 2023-10-26T22:29:51Z by @MarshalX in

  • Update lexicons fetched from 772736a committed 2023-11-02T20:16:26Z by @MarshalX in

  • Update changelog for v0.0.29 by @MarshalX in

  • Fix type hint of OnMessageCallback (Firehose client) by @MarshalX in

  • Fix dependency groups by @MarshalX in

Version 0.0.29#


  • Make codegen deterministic by @DXsmiley in

  • Add TypedDict for params and data arguments; add type hint for kwargs by @DXsmiley in

  • Update lexicons fetched from 41ee177 committed 2023-09-27T21:08:58Z by @MarshalX in

  • Update changelog for v0.0.28 by @MarshalX in

Version 0.0.28#


  • Add update_params method to firehose clients to fix utilizing the old state on reconnecting by @MarshalX in

  • Add the ability to export and import session string by @MarshalX in

  • Add the ability to pass base_uri to Firehose clients by @MarshalX in

  • Update lexicons fetched from 9879ca9 committed 2023-09-14T20:24:48Z by @MarshalX in

  • Update changelog for v0.0.27 by @MarshalX in

Version 0.0.27#


  • Add reposts support to the firehose process commits example by @MarshalX in

  • Add snake to camel and camel to snake case conversion support for DotDict wrapper by @MarshalX in

  • Update lexicons fetched from 07bb0da committed 2023-09-12T17:37:57Z by @MarshalX in

  • Update dependencies by @MarshalX in

Version 0.0.26#


All models have been migrated to Pydantic v2. Fields constraints have been added. Decoding of DAG-CBOR, CID and CAR files has been migrated to the brand-new library libipld. This library is powered by Rust and is much faster than the previous implementation. Pydantic v2 also uses Rust in the core. This leads to a significant performance boost.

Firehose catch up benchmark:

  • The previous SDK version: 700 commits in 5 seconds.

  • After migration to Pydantic v2: 2650 commits in 5 seconds.

  • After migration to libipld: 20000 commits in 5 seconds.

  • Using pydantic v2 and libipld with multiprocessing: 30000 commits in 5 seconds.

The new release gives a 40x performance boost! But the cost is a lot of breaking changes.

Example of firehose consumer with multiprocessing:

Test stand for benchmarks: MacBook Pro 2021, Apple M1 Pro, 32 GB RAM, 450mbps connection speed, Python 3.8

❗Breaking changes

  • Python 3.7.0 has been dropped. The minimum supported version is now Python 3.7.1.

  • Camel cased fields are gone. Use snake case instead. For example, createdAt is now created_at.

  • Root namespace has been fixed from bsky to app. For example, Client().bsky.feed.get_likes is now Client().app.bsky.feed.get_likes.

  • Using similar model instances as strong refs is not allowed anymore. Use models.create_strong_ref helper function to convert refs (example).

  • Creating model instances using positional arguments is no longer supported. Use keyword arguments instead. For example, thant’s not possible anymore models.ComAtprotoIdentityResolveHandle.Params(''). Use models.ComAtprotoIdentityResolveHandle.Params(handle='') instead.

  • Fields that conflict with reserved Pydantic names has _ (underscore) suffix. For example, validation is now validation_.

  • DotDict has been moved to models.dot_dict.

  • Inheritance of base models has been changed. Please check new base classes.

  • Inheritance of DotDict has been changed. Please check the new base class.

  • BlobRef model doesn’t contain to_dict() method anymore.

  • CID class has been reimplemented using libipld lib. It supports much less API.

  • _type field of models has been renamed to py_type. Now it’s constant.

  • leb128 module has been removed.

  • Type hint of CID has been changed to CIDType.

  • Type hint of DotDict has been changed to DotDictType.

  • multiformats and dag-cbor dependencies have been removed.

  • These reference classes have been removed:

    • ResponseRef from get_profile. Use models.AppBskyActorDefs.ProfileViewDetailed instead.

    • ResponseRef from get_moderation_action. Use models.ComAtprotoAdminDefs.ActionViewDetail instead.

    • ResponseRef from get_moderation_report. Use models.ComAtprotoAdminDefs.ReportViewDetail instead.

    • ResponseRef from get_record. Use models.ComAtprotoAdminDefs.RecordViewDetail instead.

    • ResponseRef from get_repo. Use models.ComAtprotoAdminDefs.RepoViewDetail instead.

    • ResponseRef from resolve_moderation_reports. Use models.ComAtprotoAdminDefs.ActionView instead.

    • ResponseRef from reverse_moderation_action. Use models.ComAtprotoAdminDefs.ActionView instead.

    • ResponseRef from take_moderation_action. Use models.ComAtprotoAdminDefs.ActionView instead.

    • ResponseRef from create_app_password. Use models.ComAtprotoServerCreateAppPassword.AppPassword instead.

  • These exceptions have been removed:

    • UnexpectedFieldError. Use ModelError instead.

    • MissingValueError. Use ModelError instead.

    • ModelFieldError. Use ModelError instead.

    • WrongTypeError. Use ModelError instead.

    • CBORDecodingError. Use DAGCBORDecodingError instead.

New Features

  • Unit tests for model serialization and deserialization.

  • Nested dictionaries support in DotDict models.

  • DotDict models now support __getitem__ and __setitem__ methods.

  • create_strong_ref helper function to convert ref-like models to strong refs.

  • Fields constraints for models. Now you can see the max items count for the image array, max string length, etc.

  • Better documentation of models.

Minor Changes

  • Fixed nesting of DotDict models.

  • Fixed serialization of Union types.

  • Fixed serialization of Literal types.

  • Fixed sending proper datetime values to the server.

  • Fixed printing tracebacks in the Firehose async client.

  • Fixed chaining of firehose exceptions.

  • Fixed locked and outdated typing-extensions dependency.

  • Fixed passing of arguments to ClientBase.

Version 0.0.25#


🔥 Bsky made breaking changes in models of firehose. This release fixes it

  • Update changelog for v0.0.24 by @MarshalX in

  • Update lexicons fetched from ad1fcf1 committed 2023-08-30T00:07:21Z by @MarshalX in

Version 0.0.24#


  • Add update profile example by @MarshalX in

  • Add automatic link (facet) detection example by @Jxck-S in

  • Update changelog for v0.0.23 by @MarshalX in

  • Update changelog by @MarshalX in

  • Update lexicons fetched from 244bf46 committed 2023-08-10T20:54:24Z by @MarshalX in

  • Update packages; fix CVE-2023-37920 (certifi) by @MarshalX in

  • Fix update profile example by @IamC8 in

Version 0.0.23#


  • ❗ Delete get_or_create_model method (backward incompatible) by @MarshalX in

  • Add documentation for base models by @MarshalX in

  • Add import aliases for “models.utils” by @MarshalX in

  • Add str and repr for BlobRef by @MarshalX in

  • Add Firehose process commits example by @MarshalX in

  • Implement additional magic methods for DotDict by @MarshalX in

  • Make languages constants immutable by @MarshalX in

  • Fix get_model_as_dict for DotDict by @MarshalX in

  • Fix is_record_type for DotDict models by @MarshalX in

  • Fix access to unknown fields in DotDict by @MarshalX in

  • Update changelog for v0.0.21 by @MarshalX in

Version 0.0.22#


release has been yanked

Version 0.0.21#


  • Add dot notation for dictionaries by @MarshalX in

  • Fix unknown type that could be plain dictionary by @MarshalX in

  • Fix parsing of custom (extended) records by @MarshalX in

  • Fix a small typo in by @ndrezn in

  • Update lexicons fetched from b2ef386 committed 2023-07-20T16:00:51Z by @MarshalX in

  • Update changelog for v0.0.20 by @MarshalX in

Version 0.0.20#


  • Update changelog for v0.0.19 by @MarshalX in

  • Add pagination example using cursors by @ymdpharm in

  • Migrate to websockets lib (fixed all known issues with lost firehouse frames, reconnections and crashes) by @MarshalX in

Version 0.0.19#


  • Update changelog for v0.0.18 by @MarshalX in

  • Add posts langs support by @MarshalX in

  • Fix infinite loop of reconnections to Firehose by @MarshalX in

  • Update lexicons fetched from 775944e committed 2023-07-17T23:06:44Z by @MarshalX in

Version 0.0.18#


  • Update changelog for v0.0.17 by @MarshalX in

  • Fix is_record_type for dict record types by @joelghill in

  • Lower version of typing-extensions as possible; update ruff by @MarshalX in

  • Update lexicons fetched from b9ca76f committed 2023-07-14T23:05:56Z by @MarshalX in

Version 0.0.17#


  • Update changelog for v0.0.16 by @MarshalX in

  • Move the websocket client into part of the atproto package by @MarshalX in

  • Update lexicons fetched from e7a0d27 committed 2023-07-03T16:28:39Z by @MarshalX in

Version 0.0.16#


  • Update changelog for v0.0.15 by @MarshalX in

  • Update lexicons fetched from 0306f81 committed 2023-06-23T20:30:52Z by @MarshalX in

  • Lock ruff version in GHA workflow by @MarshalX in

Version 0.0.15#


  • Update changelog for v0.0.14 by @MarshalX in

  • Update Cimon by @MarshalX in

  • Update lexicons fetched from 84032a6 committed 2023-06-12T21:51:38Z by @MarshalX in

  • Update Ruff; make _MANDATORY_HEADERS private; fix issues by @MarshalX in

  • Disable Cimon fail-on-error flag by @MarshalX in

  • Update lexicons fetched from 2768fb9 committed 2023-06-20T14:36:09Z by @MarshalX in

  • Fix dynamic versioning build backend by @MarshalX in

Version 0.0.14#


  • Update changelog for v0.0.13 by @MarshalX in

  • Add Cimon in Detect Mode by @MarshalX in

  • Enable Cimon Prevent Mode by @MarshalX in

  • Add send_embed example by @MarshalX in

  • Update README by @MarshalX in

  • Update lexicons fetched from 8857fb0 committed 2023-06-09T13:21:09Z by @MarshalX in

  • Bump requests from 2.30.0 to 2.31.0 by @dependabot in

Version 0.0.13#


  • Update changelog for v0.0.12 by @MarshalX in

  • Update lexicons (add admin.rebaseRepo) fetched from 4a6c976 committed 2023-05-30T15:50:46Z by @MarshalX in

Version 0.0.12#


  • Update changelog for v0.0.11 by @MarshalX in

  • Add mypy; fix types; fix error handling of requests by @MarshalX in

  • Increase max message size in Firehose by @MarshalX in

Version 0.0.11#


  • Update changelog for v0.0.10 by @MarshalX in

  • Keep Firehose open on invalid CBOR or DAG-CBOR by @MarshalX in

Version 0.0.10#


  • Update changelog for v0.0.9 by @MarshalX in

  • Add CLI for codegen by @MarshalX in

  • Update lexicons fetched from 743eaf1 committed 2023-05-26T00:04:10Z by @MarshalX in

  • Add Ruff; init tests; fix code style and type hints by @MarshalX in

  • Move docs dependencies to separated group by @MarshalX in

  • Fix Ruff for root dir by @MarshalX in

  • Update lexicons fetched from c62964b committed 2023-05-26T00:22:05Z by @MarshalX in

  • Fix .gitignore by @MarshalX in

  • Custom feed generators by @MarshalX in

  • Fix firehose params by @MarshalX in

Version 0.0.9#


  • Update changelog for v0.0.8 by @MarshalX in

  • Add “delete_post” and “repost” methods by @codybraun in

  • Fix request error handling by @MarshalX in

Version 0.0.8#


  • update changelog for v0.0.7 by @MarshalX in

  • Fix duplication of field descriptions in docs by @MarshalX in

  • Add support for custom feeds. Update lexicons fetched from d661a60 committed 2023-05-23T05:02:36Z by @MarshalX in

  • Add Firehose (data streaming) by @MarshalX in

  • Add forgotten models by @MarshalX in

  • Fix link format in docs by @MarshalX in

Version 0.0.7#


  • update changelog for v0.0.6 by @MarshalX in

  • Update docs by @MarshalX in

  • Short typing import by @MarshalX in

  • Fix session refreshing by @MarshalX in

Version 0.0.6#


  • update changelog for v0.0.5 by @MarshalX in

  • Update docs domain; improve open graph by @MarshalX in

  • Don’t lock dependencies so strictly; add pyjwt by @MarshalX in

  • Add session refreshing by @MarshalX in

  • Update lexicons fetched from cf36b36 committed 2023-05-18T22:57:59Z by @MarshalX in

Version 0.0.5#


  • update changelog for v0.0.4 by @MarshalX in

  • Add CAR files support by @MarshalX in

  • Update lexicons fetched from 1cbffd6 committed 2023-05-12T21:45:15Z (lists, mute lists preferences, repo rebase, and more), by @MarshalX in

  • Fix spacing in examples by @prtolem in

  • bump version by @MarshalX in

  • Add PyPI publishing to release workflow by @MarshalX in

  • Dynamic versioning from Git Tags by @MarshalX in

  • fix creating of GitHub Release by @MarshalX in

Version 0.0.4#


  • update changes for 0.0.3 by @MarshalX in

  • Update logo by @MarshalX in

  • add example with rich text; fix generation of system type field by @MarshalX in

  • fix sending of facets

Version 0.0.3#


  • add GHA workflow to create release on tag creation by @roj1512 in

  • Add notifications example by @MarshalX in

  • simplify and fix process_notifications example by @MarshalX in

  • add ability to access to model’s fields by [] by @MarshalX in

  • add deserialization of records by @MarshalX in

  • add home_timeline and profile_posts examples by @MarshalX in

  • publish package with OpenID Connect by @MarshalX in

  • bump version to 0.0.3 by @MarshalX in

Version 0.0.2#


The first public release.