Skip to main content

A wrapper for interacting with the AT Protocol API.

Project description

AT Protocol Python Library

A wrapper for interacting with the AT Protocol API, specifically for the Bluesky social network.

Note: There are some hard-coded Bluesky method names in this library, so the current version will not work with other AT Protocol implementations. The plan is to change this as new servers become available.

Getting Started

To install the library, run:

pip install pyatproto

Quickstart

import pyatproto as atproto
import os

ENDPOINT = os.environ.get("ATPROTO_ENDPOINT")
USERNAME = os.environ.get("ATPROTO_USERNAME")
PASSWORD = os.environ.get("ATPROTO_PASSWORD")

ap = atproto.AtProtoConfiguration(ENDPOINT, USERNAME, PASSWORD)

create_post = ap.create_post("My First Post")

print(create_post)

Example Scripts

  • quickstart.py: Authenticate and create a post on Bluesky.
  • crawler.py: Find the messages posted by each person a user follows, recursively (rate limits prevent this being used for crawling the whole network without adjusting the logic, however).
  • unroll.py: Find the parent of a message for use with the bsky.link thread unrolling feature.

Contributing

Contributions are welcome, especially those that add more methods to the library. Please open an issue or pull request to contribute to the library.

License

This project is licensed under an MIT 0 License.

Contributors

  • capjamesg

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyatproto-0.2.0.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distribution

pyatproto-0.2.0-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page