Skip to main content

prefect-twitter

PyPI

Visit the full docs here to see additional examples and the API reference.

Prefect integrations for interacting with Twitter.

Resources

For more tips on how to use tasks and flows in a Collection, check out Using Collections!

Installation

Install prefect-twitter with pip:

pip install prefect-twitter

Requires an installation of Python 3.7+.

We recommend using a Python virtual environment manager such as pipenv, conda or virtualenv.

These tasks are designed to work with Prefect 2. For more information about how to use Prefect, please refer to the Prefect documentation.

Write and run a flow

Tweets an update with just text.

from prefect import flow
from prefect_twitter import TwitterCredentials
from prefect_twitter.tweets import update_status

@flow
def example_update_status_flow():
    twitter_credentials = TwitterCredentials(
        consumer_key="consumer_key",
        consumer_secret="consumer_secret",
        access_token="access_token",
        access_token_secret="access_token_secret"
    )
    status_id = update_status(twitter_credentials, status="A Prefect Tweet!")
    return status_id

example_update_status_flow()

Feedback

If you encounter and bugs while using prefect-twitter, feel free to open an issue in the prefect-twitter repository.

If you have any questions or issues while using prefect-twitter, you can find help in either the Prefect Discourse forum or the Prefect Slack community.

Feel free to star or watch prefect-twitter for updates too!

Development

Contributing

If you'd like to help contribute to fix an issue or add a feature to prefect-twitter, please propose changes through a pull request from a fork of the repository.

Here are the steps:

  1. Fork the repository
  2. Clone the forked repository
  3. Install the repository and its dependencies:
pip install -e ".[dev]"
  1. Make desired changes
  2. Add tests
  3. Insert an entry to CHANGELOG.md
  4. Install pre-commit to perform quality checks prior to commit:
 pre-commit install
  1. git commit, git push, and create a pull request

Metadata

Release files for prefect-twitter 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prefect-twitter 0.2.2
File Size Uploaded
prefect-twitter-0.2.2.tar.gz 32.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for prefect-twitter 0.2.2
File Interpreter ABI Platform
prefect_twitter-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 44.7 kB

Release files / prefect-twitter-0.2.2.tar.gz

Download URL prefect-twitter-0.2.2.tar.gz
Size 32.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8ce1fb5477857cc238988637145cf025f427ffd83c47f6b9444f0e2660854d76
BLAKE2b-256 checksum
How to use checksums
f367fed0a869ca1d32b3f18192b89a637f8dff857a8102da2ce5aef68dc0f345
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / prefect_twitter-0.2.2-py3-none-any.whl

Download URL prefect_twitter-0.2.2-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ea5066344e081754f54464d18835b45aaaa71f0ef0e63d0b4d70c2f284241aa
BLAKE2b-256 checksum
How to use checksums
6a2d9cbffd625c54a905f049387bd5bdd0dd8f4da1f12ed81b974f6aafbaf19d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page