Skip to main content
pyrate
======

.. image:: https://pypip.in/v/pyrate/badge.png
:target: https://crate.io/packages/pyrate/
:alt: Latest PyPI version

.. image:: https://pypip.in/d/pyrate/badge.png
:target: https://crate.io/packages/pyrate/
:alt: Number of PyPI downloads


Pyrate is a python wrapper for restful web apis. It's like *magic* but
simpler.

Currently, the following services are implemented

- `Github <#github>`__
- `Harvest <#harvest>`__
- `Basecamp <#basecamp>`__
- `Mailchimp (v2) <#mailchimp>`__
- `Twitter (v1.1 + OAuth) <#twitter>`__

There's a quick-start guide below, for full documentation (WIP) visit: `http://pyrate.readthedocs.org/en/latest/ <http://pyrate.readthedocs.org/en/latest/>`__

Dependencies
------------

- `requests <http://python-requests.org>`__
- `requests\_oauthlib <https://github.com/requests/requests-oauthlib>`__

Install
-------

::

# so simple
pip install pyrate

Quick Start
-----------

Twitter
~~~~~~~

::

from pyrate.services import twitter

h = twitter.TwitterPyrate('oauth_consumer_key', 'oauth_consumer_secret',
'oauth_token', 'oauth_token_secret')

print(h.do('account/verify_credentials'))
print(h.check_connection())
h.tweet("This is awesome!")

Mailchimp
~~~~~~~~~

::

from pyrate.services import mailchimp

h = mailchimp.MailchimpPyrate('apikey')

print(h.do('helper/ping'))
print(h.check_connection())
h.subscribeToList('ListName', 'myemail@example.com')
h.unsubscribeFromList('ListName', 'myemail@example.com')

Harvest
~~~~~~~

::

from pyrate.services import harvest

h = harvest.HarvestPyrate('user', 'password', 'organisation')

print(h.do('account/who_am_i'))
print(h.check_connection())

Github
~~~~~~

::

from pyrate.services import github

h = github.GithubPyrate('user', 'password')

print(h.do('#'))
print(h.check_connection())
h.create_repo('name', 'description', private=True)
h.create_repo('name', 'description', 'organisation')
h.delete_repo('name')

Basecamp
~~~~~~

::

from pyrate.services import basecamp

h = basecamp.BasecampPyrate('user', 'password', 'org_id')

print(h.do('projects'))
h.check_connection()

Todos
-----

- Create more "convenience"-methods (like
``h.tweet("This is awesome!")``)
- Implement CLI-Interface (see branch
`feature/cli <https://github.com/Chive/pyrate/tree/feature/cli>`__)
- Add more services (Open for suggestions!)
- Expand Documentation
- lots and lots more

Metadata

Release files for pyrate 0.4.0

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

Source distribution (sdist)

Source distribution for pyrate 0.4.0
File Size Uploaded Provenance Actions
pyrate-0.4.0.tar.gz 10.4 kB Without provenance Details for pyrate-0.4.0.tar.gz

Release files / pyrate-0.4.0.tar.gz

Download URL pyrate-0.4.0.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b2d3d2856f17ebe5c814d1f1aa73498413d18412cfbdb5380d3b0f399fc281fa
BLAKE2b-256 checksum
How to use checksums
e9886eab0445775b3f8331a5df96cc861dc6327a60c1651e76a9e205a45ffaef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pyrate 0.4.0

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.

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