Skip to main content

A Python interface for interacting with the BlueSky social network's API.

Project description

bsky-bridge Library

bsky-bridge is a Python library providing a streamlined interface to interact with the BlueSky social network via its API.

Table of Contents

Features

  • Easy authentication with BlueSky.
  • Functions to post text and images to BlueSky.

Installation

pip install bsky-bridge

Usage

Creating a Session

Start by establishing a session with your BlueSky handle and password:

from bsky_bridge import BskySession

session = BskySession("your_handle.bsky.social", "your_password")

Posting Content

After initializing a session, you can post text to BlueSky:

from bsky_bridge import post_text

response = post_text(session, "Hello BlueSky!")
print(response)

Posting Images

To post images along with text, you can use the post_image method:

from bsky_bridge import post_image

postText = "Check out this cool image!"
imagePath = "path_to_your_image.jpeg"
altText = "An awesome image"
response = post_image(session, postText, imagePath, altText)
print(response)

Note: The library automatically handles resizing and compressing larger images to ensure they do not exceed 1 MB in size, all while maintaining a quality balance. This ensures efficient and quick image uploads.

Contribution

Contributions are welcome! Please submit issues for any bug or problem you discover, and pull requests for new features or fixes.

License

MIT License

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

bsky-bridge-1.0.0.tar.gz (5.3 kB view details)

Uploaded Source

File details

Details for the file bsky-bridge-1.0.0.tar.gz.

File metadata

  • Download URL: bsky-bridge-1.0.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for bsky-bridge-1.0.0.tar.gz
Algorithm Hash digest
SHA256 72276f9daa8d2eacd46705c8335da352bd4eb0b1ea5f07798b53cceef13c58d0
MD5 6c0dee81b721e058271b4aa5b1e7339e
BLAKE2b-256 56ffaa444ac0371727f7e586f4e90fc16b9d6c78ec170d0973331f0c2e0a9949

See more details on using hashes here.

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