DevToPy
DevToPy is a Python client library for interacting with the dev.to API. It provides easy access to key dev.to features including article retrieval, posting, user information management, and more.
Installation
You can install DevToPy using pip:
pip install devtopy
Quick Start
Here's a quick example of how to use DevToPy:
from devtopy import DevTo
# Initialize the client with your API key
client = DevTo(api_key="your_api_key_here")
# Get the latest articles
latest_articles = client.articles.get_latest_articles()
# Publish a new article
new_article = client.articles.publish(
title="My New Article",
body_markdown="This is the content of my article.",
tags=["python", "api"],
published=True
)
# Get your own articles
my_articles = client.articles.get_my_articles()
# Get comments for an article
article_comments = client.comments.get_article_comments(article_id="123")
# Toggle a reaction on an article
client.reactions.toggle(
category=client.reactions.ReactionCategory.LIKE,
reactable_id=123,
reactable_type=client.reactions.ReactableType.ARTICLE
)
Features
DevToPy now supports the following operations:
- Articles: Retrieve, publish, update, and manage articles
- Comments: Get comments for articles and podcast episodes
- Followed Tags: Manage followed tags
- Organizations: Retrieve organization information and users
- Podcast Episodes: Get podcast episode information
- Profile Images: Retrieve user profile images
- Reactions: Add and toggle reactions on articles, comments, and users
- Tags: Retrieve tag information
- Users: Get user information, invite users
- Videos: Retrieve articles with videos
API Reference
For detailed information on all available methods, please refer to the API documentation.
Requirements
- Python 3.8+
- pydantic >= 2.8.2
- requests >= 2.32.3
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for devtopy 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| devtopy-0.1.1.tar.gz | 8.9 kB | Without provenance | Details for devtopy-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| devtopy-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for devtopy-0.1.1-py3-none-any.whl |
Total release size: 21.3 kB
Release files / devtopy-0.1.1.tar.gz
| Download URL | devtopy-0.1.1.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31ee047c370d1998537306304e458507ca4aa65c4b2d50947f1be3825641815d
|
|
BLAKE2b-256 checksum How to use checksums |
1d0d065ef1f2aea870874fa2b37547e7ac4d804be7224bd8adf80ed0e2af31f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.5
|
Release files / devtopy-0.1.1-py3-none-any.whl
| Download URL | devtopy-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
503260c175ff406d533b4847f2cd5a4e608d61fc0c3f6fe2bf6019530f3c389d
|
|
BLAKE2b-256 checksum How to use checksums |
16345de0dc0651e96fd0389bfed4c9e69c0b7b45859a68fba9ea524fd80a5fd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.5
|
Security for devtopy 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.