A simple package to interact with the Parqet API.
Project description
parqet-python
An inoffical package to communicate with the Parqet API.
Key Features • How To Use • Download • Credits • Related • License
Key Features
The parqet-python package will use the Parqet API to gather information about public Portfolios. Available information includes:
- Portfolio name
- Portfolio value
- Gain gross / net
- Total invested
- List of activities and holdings
- and many more...
How To Use
Installation
Install the package via pip. This will also install the dependency loguru for logging purposes.
# Install the package
$ pip install parqet
Usage
Create a Portfolio
object and get the name of the portfolio.
# Import the package
from parqet import portfolio
# Create a portfolio object
portfolio = Portfolio("YOUR_PORTFOLIO_ID")
# Extract the portfolio name and print it
print(portfolio.get_name())
Note Your portfolio has to be set to public to access it via the API.
Full list of functions
Function Name | Description | Return Type | Example |
---|---|---|---|
get_name() | Returns the name of the portfolio. | str |
portfolio.get_name() returns "My Portfolio" |
get_value() | Returns the current value of the portfolio. | float |
portfolio.get_value() returns 6000.0 |
get_total_gain_gross() | Returns the total gross gain of the portfolio. | float |
portfolio.get_total_gain_gross() returns 1000.0 |
get_total_invested() | Returns the total amount invested in the portfolio. | float |
portfolio.get_total_invested() returns 5000.0 |
get_total_gain_net() | Returns the total net gain of the portfolio. | float |
portfolio.get_total_gain_net() returns 800.0 |
get_total_return_gross() | Returns the total gross return of the portfolio. | float |
portfolio.get_total_return_gross() returns 20.0 |
get_total_return_net() | Returns the total net return of the portfolio. | float |
portfolio.get_total_return_net() returns 16.0 |
get_fees() | Returns the total fees paid for the portfolio. | float |
portfolio.get_fees() returns 50.0 |
get_created_at() | Returns the date of the portfolio's creation. | str |
portfolio.get_created_at() returns "2023-05-25T20:45:04.802Z" |
get_holdings() | Returns a list of holdings in the portfolio. | list |
portfolio.get_holdings() returns [{...}] |
get_activities() | Returns a list of activities of the holdings in the portfolio. | list |
portfolio.get_activities() returns [{...}] |
Download
If you don't want to install the package via pip, you can instead download the latest release of the sourcecode.
Credits
This software uses Loguru for logging.
License
GPL
GitHub @JoghurtConnaisseur ·
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
Built Distribution
File details
Details for the file parqet-1.0.4.tar.gz
.
File metadata
- Download URL: parqet-1.0.4.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14dd06c4a1efb4ddd5360e76539131bd7e98d89f7764988250247d0699539b05 |
|
MD5 | 4e55912d68baa24cef7aded2747ee0b1 |
|
BLAKE2b-256 | 30654265a8d66833a2ca3348d0b7e8868675e3619a5c0f98d66943376b328ab2 |
File details
Details for the file parqet-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: parqet-1.0.4-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f444e2f6c18790fda66a84d197a407c200dbb34212e66d565de8987092549541 |
|
MD5 | b73b4adc382fa3d38fc0b2f9b3ffd318 |
|
BLAKE2b-256 | b22e430f1c3877e343f3923721fe8034600cdcb660d39ea540e9ff4ec73ff779 |