Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

django-toots

Create and delete toots in a Django project.

This package takes advantage of the Mastodon.py functionalities to connect it to a Django Backend.

Set up

  1. Install from PyPI
python -m pip install django-toots
  1. Add the package to your settings INSTALLED_APPS
INSTALLED_APPS = [
    ...
    "django_toots",
    ...
]
  1. Add the following settings to your Django project.

Example:

import os
from dotenv import load_dotenv
load_dotenv()

...

# django-toots 
MASTODON_ACCESS_TOKEN=os.environ.get("MASTODON_ACCESS_TOKEN", "") 
MASTODON_API_BASE_URL = "https://fosstodon.org"
  1. Run migrations
python manage.py migrate

Usage

TODO: Document this!

Create a simple toot

from django_toots.models import Toot

# create a toot in the db
t = Tweet.objects.create(text="Hi, this is my toot using django-toots and Mastodon.py")

# publish it
t.publish()

Metadata

Release files for django-toots 0.0.1

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

Source distribution (sdist)

Source distribution for django-toots 0.0.1
File Size Uploaded
django-toots-0.0.1.tar.gz 7.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-toots 0.0.1
File Interpreter ABI Platform
django_toots-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.2 kB

Release files / django-toots-0.0.1.tar.gz

Download URL django-toots-0.0.1.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
050f469c81735d1d2d5bd9056af303b3bea150030ffba3feaa4d1d9d48440ed1
BLAKE2b-256 checksum
How to use checksums
ed2535161351a0f71b09b49160b7b24505d24017c12817d160481433534acb74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

Release files / django_toots-0.0.1-py3-none-any.whl

Download URL django_toots-0.0.1-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a535262d01675ea11f45e43671ca00d9c3fa0b20ab83dab3fe8289026a8845e
BLAKE2b-256 checksum
How to use checksums
a8242c1f9534aa51b107d54d47f4ca4ca6f57881782fbdde7416c6f39921d3ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.0.1 This release

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