Name | peerberrypy JSON |
Version |
1.9.0
JSON |
| download |
home_page | |
Summary | Python API Wrapper for PeerBerry |
upload_time | 2024-01-09 13:21:14 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | MIT License Copyright (c) 2022 Tomás Perestrelo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
python
api
api-wrapper
peerberrypy
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
## 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.8+
Main dependencies:
- cloudscraper for accessing the API without getting blocked by CF anti-DDOS,
Optional dependencies:
- pandas for the large data handling,
- openpyxl for parsing spreadsheets supplied by Peerberry,
- pyotp for handling two-factor authentication.
## Installation
```bash
pip install peerberrypy
```
Replace with `peerberrypy[pandas]` to install pandas and openpyxl, `peerberrypy[otp]` to install pyotp, or `peerberrypy[pandas,otp]` to install all.
## Usage
```python
from peerberrypy import API
# Authenticate to the API client
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())
# Gets 100 of loans that are from the "Smart Pozyczka PL" originator
print(api_client.get_loans(quantity=100, originators=['Smart Pozyczka PL']))
# Gets 100 of your current investments from Kazakhstan and Lithuania
print(api_client.get_investments(quantity=100, current=True, countries=['Kazakhstan', 'Lithuania'])
```
## API functions
<pre>
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).
get_investment_originators_overview -> Gets percentage of funds in different loan originators.
Marketplace/loan data functions:
get_loans & get_loans_page -> Gets loans available for investment in the Peerberry marketplace according to the filters you specify. get_loans_page also returns metadata.
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.
Note:
The authentication logic is executed automatically upon initializing the API instance, only logout needs to be done manually.
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).
</pre>
## 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
[MIT](https://choosealicense.com/licenses/mit/)
Raw data
{
"_id": null,
"home_page": "",
"name": "peerberrypy",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "python,api,api-wrapper,peerberrypy",
"author": "",
"author_email": "Tom\u00e1s Perestrelo <tomasperestrelo21@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/2c/2d/530e801bf4a64e5ab6eda937ea6f2b6c2604cafd11581f6414c96ab8d0bb/peerberrypy-1.9.0.tar.gz",
"platform": null,
"description": "## Peerberrypy\n\nThe peerberrypy package is a Python API wrapper for the Peerberry platform.\nPeerberry currently has no API documentation and some endpoints could be simplified/optimized, which is one of the main goals of this project.\n\nPeerberry platform: https://peerberry.com/\n\n## Requirements \n\nPython 3.8+\n\nMain dependencies:\n- cloudscraper for accessing the API without getting blocked by CF anti-DDOS,\n\nOptional dependencies:\n- pandas for the large data handling,\n- openpyxl for parsing spreadsheets supplied by Peerberry,\n- pyotp for handling two-factor authentication.\n\n## Installation\n\n```bash\npip install peerberrypy\n```\n\nReplace with `peerberrypy[pandas]` to install pandas and openpyxl, `peerberrypy[otp]` to install pyotp, or `peerberrypy[pandas,otp]` to install all.\n\n## Usage\n\n```python\nfrom peerberrypy import API\n\n\n# Authenticate to the API client\napi_client = API(\n email='YOUR EMAIL HERE',\n password='YOUR PASSWORD HERE',\n tfa_secret='YOUR BASE32 TFA SECRET HERE', # This is only required if you have two-factor authentication enabled on your account\n)\n\n# Gets investor profile data\nprint(api_client.get_profile())\n\n# Gets 100 of loans that are from the \"Smart Pozyczka PL\" originator\nprint(api_client.get_loans(quantity=100, originators=['Smart Pozyczka PL']))\n\n# Gets 100 of your current investments from Kazakhstan and Lithuania\nprint(api_client.get_investments(quantity=100, current=True, countries=['Kazakhstan', 'Lithuania'])\n```\n\n## API functions\n\n<pre>\nInvestor/portfolio data functions:\n get_profile -> Gets investor profile.\n get_loyalty_tier -> Gets loyalty tier, tier requirements, and the tier's benefits.\n get_overview -> Gets portfolio overview (Balance, total invested, total profit, net annual return, etc.).\n get_profit_overview -> Gets portfolio's profit on a daily, monthly or yearly basis (Data used in your profile's profit chart).\n get_investment_status -> Gets percentage of funds in different investment statuses (Current, late by 1-15 days, 16-30 days, and 31-60 days).\n get_investment_originators_overview -> Gets percentage of funds in different loan originators.\n \nMarketplace/loan data functions:\n get_loans & get_loans_page -> Gets loans available for investment in the Peerberry marketplace according to the filters you specify. get_loans_page also returns metadata.\n get_loan_details -> Gets available information about the loan, the borrower, and the loan's payments schedule.\n purchase_loan -> Invests in a loan with the amount you specify.\n\nInvestment data functions:\n 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).\n 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).\n get_account_summary -> Gets account's transaction summary (Invested funds, principal payments, interest payments, deposits, etc.).\n\nTransaction data functions:\n get_transactions -> Gets transactions as a Pandas DataFrame in accordance with the filters you specify.\n get_mass_transactions -> Gets transactions either as an Excel or as a Pandas DataFrame.\n \nAuthentication functions:\n 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.\n logout -> Logs out of Peerberry and revokes your access token. Recommended to use after you finish all your operations.\n\nNote:\nThe authentication logic is executed automatically upon initializing the API instance, only logout needs to be done manually.\nThe 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).\n</pre>\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\nPlease make sure to update tests as appropriate.\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2022 Tom\u00e1s Perestrelo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Python API Wrapper for PeerBerry",
"version": "1.9.0",
"project_urls": {
"Repository": "https://github.com/thicccat688/peerberrypy"
},
"split_keywords": [
"python",
"api",
"api-wrapper",
"peerberrypy"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4486e1aa8ecf39e361463ede7d057722b9fbf561f1cad508e69eaba2cc24d7a6",
"md5": "58d7c23f318388bb9faa4e622126df6f",
"sha256": "92619c4894563480edbbde6a0e8ad243fbdc2d19e32dae85772652eab3002663"
},
"downloads": -1,
"filename": "peerberrypy-1.9.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "58d7c23f318388bb9faa4e622126df6f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 14329,
"upload_time": "2024-01-09T13:21:12",
"upload_time_iso_8601": "2024-01-09T13:21:12.856677Z",
"url": "https://files.pythonhosted.org/packages/44/86/e1aa8ecf39e361463ede7d057722b9fbf561f1cad508e69eaba2cc24d7a6/peerberrypy-1.9.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2c2d530e801bf4a64e5ab6eda937ea6f2b6c2604cafd11581f6414c96ab8d0bb",
"md5": "6fcc3b11ded4d149840beb9255e46f85",
"sha256": "149b214c3f4a53c3881015751030b8f58dc40bc36e7284120904c53b9e3417a0"
},
"downloads": -1,
"filename": "peerberrypy-1.9.0.tar.gz",
"has_sig": false,
"md5_digest": "6fcc3b11ded4d149840beb9255e46f85",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 15036,
"upload_time": "2024-01-09T13:21:14",
"upload_time_iso_8601": "2024-01-09T13:21:14.876777Z",
"url": "https://files.pythonhosted.org/packages/2c/2d/530e801bf4a64e5ab6eda937ea6f2b6c2604cafd11581f6414c96ab8d0bb/peerberrypy-1.9.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-09 13:21:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "thicccat688",
"github_project": "peerberrypy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "peerberrypy"
}