Skip to main content

A Simple Python Wrapper For The Venmo API

Project description

Venmo API

Introduction

This is a wrapper for the Venmo API. This library provides a Python interface for the Venmo API. It's compatible with Python versions 3.6+.

Installing

You can install or upgrade venmo-api with:

$ pip3 install venmo-api --upgrade

Or you can install it from the source:

$ git clone https://github.com/mmohades/Venmo.git --recursive
$ cd Venmo
$ python3 setup.py install

Getting Started

Usage

In short, you can send money, request for money, get a user's public transactions, get a user's public profile info, etc. The following is an example of initializing and working with it.

from venmo_api import Client

# Get your access token. You will need to complete the 2FA process
access_token = Client.get_access_token(username='myemail@random.com',
                                       password='your password')
venmo = Client(access_token=access_token)

# Search for users. You get 50 results per page.
users = venmo.user.search_for_users(query="Peter",
                                    page=2)
for user in users:
   print(user.username)

# Or, you can pass a callback to make it multi-threaded
def callback(users):
   for user in users:
       print(user.username)
venmo.user.search_for_users(query="peter",
                            callback=callback,
                            page=2,
                            count=10)

Keep this in mind that your access token never expires! You will need to revoke it by yoursef.

venmo.log_out("Bearer a40fsdfhsfhdsfjhdkgljsdglkdsfj3j3i4349t34j7d")
# Request money
venmo.payment.request_money(32.5, "house expenses", "1122334455667")
# Send money
venmo.payment.send_money(13.68, "thanks for the 🍔", "1122334455667")

Getting a user's transactions (public, friends and privates that happen between your account and user_id account)

def callback(transactions_list):
    for transaction in transactions_list:
        print(transaction)

# callback is optional. Max number of transactions per request is 50.
venmo_api.user.get_user_transactions(user_id='0000000000000',
                                     callback=callback) 

Documentation

venmo-api's documentation lives at readthedocs.io.

Contributing

Contributions of all sizes are welcome. You can help with the wrapper documentation located in /docs. You can also help by reporting bugs. You can add more routes to both Venmo Unofficial API Documentation and the venmo-api wrapper.

Venmo Unofficial API Documentation

You can find and contribute to the Venmo Unofficial API Documentation.

Project details


Download files

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

Source Distribution

venmo-api-0.2.2.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

venmo_api-0.2.2-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

Details for the file venmo-api-0.2.2.tar.gz.

File metadata

  • Download URL: venmo-api-0.2.2.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for venmo-api-0.2.2.tar.gz
Algorithm Hash digest
SHA256 db1d1a03eb71a9018dd9fc9b0fcc99e58cf9beb9a04c2fdab13a3bca62aa2957
MD5 6b324716563c5306c15b1e78e3f52f23
BLAKE2b-256 a97828fe95f3a181029f0f397356d9333977d1f72ac3f778e4c1d479ad5c5994

See more details on using hashes here.

File details

Details for the file venmo_api-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: venmo_api-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 32.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for venmo_api-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 afe4a561c9eb45487c0a0b90bbe641fdc802d13cae746f4d6ba6ad9831d50090
MD5 e2d4004df0b629529c76f58931611817
BLAKE2b-256 5ba90cdec00d8a3f937b08d3150ee7e79e66b5144995c39b0c63509f5f966435

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page