Skip to main content

Unoffical Dev.To Python Wrapper

Project description

Unoffical dev.to python wrapper

>>> response = Route(HTTP.GET, Endpoints.Articles.USER, 'btaskaya')()
>>> items = response.objects
>>> for post in items:
...     print(post.title, post.tag_list)
...
Python Collections ['python', 'collections', 'containertypes']
Writing an OS *from scratch* ['kernel', 'c', 'osdev', 'writingos']
>>> items[0]._fields
('type_of', 'id', 'title', 'description', 'cover_image', 'published_at', 'tag_list', 'slug', 'path', 'url', 'canonical_url', 'comments_count', 'positive_reactions_count', 'user')

Route

Requires a method and path for initalizition. Additionally can take *args for formatting path.

When called (__call__) returns APIResponse if request is ok. Else returns None

APIResponse

Requires a requests.models.Response object.

json property returns json response.

objects property return namedtuple generated with json response.

Types of HTTP

  • GET
  • POST

Endpoints

  • Articles
    • BASE | Articles Base
    • USER | Specific User’s Articles. Requires username
    • WTAG | Tagged Articles. Requires tag
    • WAID | Specific Article with Article ID. Requires aid
  • Comments
    • BASE | Comments Base
    • WAID | Specific Article’s Comments. Requires aid
  • Podcasts
    • BASE | Podcasts Base
    • USER | Specific User’s Podcasts. Requires username
  • Tags
    • BASE | Tags Base
    • LIST | A List of onboarding tags
  • Users
    • BASE | User’s Base
    • WUID | Specific User with User ID. Requires uid

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
devto-1.0.2.tar.gz (2.5 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page