No project description provided
Project description
Peerberrypy
The peerberrypy package is a Python API wrapper for the Peerberry platform. Peerberry currently has no API documentation and some endpoints could be simplified/optimized, which is one of the main goals of this project.
Peerberry platform: https://peerberry.com/
Requirements
Python 3.7+
Main dependencies:
- pandas for the large data handling.
- pyotp for handling two-factor authentication.
- requests for handling HTTP requests to the Peerberry API.
- openpyxl for parsing spreadsheets supplied by Peerberry.
Installation
pip install peerberrypy
Usage
from peerberrypy import API
# Authenticate to the API client (You won't need to manually authenticate again after this)
api_client = API(
email='YOUR EMAIL HERE',
password='YOUR PASSWORD HERE',
tfa_secret='YOUR BASE32 TFA SECRET HERE', # This is only required if you have two-factor authentication enabled on your account
)
# Gets investor profile data
print(api_client.get_profile())
API functions
Investor/portfolio data functions: get_profile -> Gets investor profile. get_loyalty_tier -> Gets loyalty tier, tier requirements, and the tier's benefits. get_overview -> Gets portfolio overview (Balance, total invested, total profit, net annual return, etc.). get_profit_overview -> Gets portfolio's profit on a daily, monthly or yearly basis (Data used in your profile's profit chart). get_investment_status -> Gets percentage of funds in different investment statuses (Current, late by 1-15 days, 16-30 days, and 31-60 days). Marketplace/loan data functions: get_loans -> Gets loans available for investment in the Peerberry marketplace according to the filters you specify. get_loan_details -> Gets available information about the loan, the borrower, and the loan's payments schedule. purchase_loan -> Invests in a loan with the amount you specify. Investment data functions: get_investments -> Gets current or finished investments in accordance to the filters you specify (It's recommended to use the get_mass_investments function when fetching more than ~350 investments at once). get_mass_investments -> Gets current or finished investments either as an Excel or as a Pandas DataFrame in accordance with the filters you specify (It's recommended to use this function when fetching more than ~350 investments at once). get_account_summary -> Gets account's transaction summary (Invested funds, principal payments, interest payments, deposits, etc.). Transaction data functions: get_transactions -> Gets transactions as a Pandas DataFrame in accordance with the filters you specify. get_mass_transactions -> Gets transactions either as an Excel or as a Pandas DataFrame. Authentication functions: login -> Logs in to Peerberry's API and assigns your session an access token. Use is not recommended as it's done automatically when initializing API instance. logout -> Logs out of Peerberry and revokes your access token. Recommended to use after you finish all your operations. <<<<<<< HEAD ======= Note: <<<<<<< HEAD The authentication logic is executed automatically upon initializing the API instance, only logout needs to be done manually. >>>>>>> ff7095d841915113f468c680437476b93cb9f777 ======= The login is executed automatically upon initializing the API instance, only logout needs to be done manually (Login is still possible to do manually, but not recommended). >>>>>>> fcfe90135c71e0bd89bb2fe937d0d1715538933b
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
peerberrypy-0.1.1.tar.gz
(11.6 kB
view hashes)
Built Distribution
Close
Hashes for peerberrypy-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28a1502b809b08143d19d1374ee91b5d92ff6dad07611f15b31a82f401573435 |
|
MD5 | a429bd996f31386cf03921e46635bbba |
|
BLAKE2b-256 | 39eaaa9ceb7ac5da5fbd5120b2af04f1a328a4fbd0ddeac108a778cd0f2c32fd |