Get stock data with unwanted brainrot in your Python app.
Project description
Brainrot-Stocks
An exercise to create a Python package, build it, test it, distribute it, and use it. See instructions for details.
This package was created by generally following the Packaging Python Projects with the addition of some pipenv setup to manage virtual environments.
Project Description
Brainrot-Stocks is a Python package designed for handling financial data. It includes modules for managing stock quotes, performing various operations on financial data, and engaging learning experiences.
Link to Package on PYPI
https://pypi.org/project/Brainrot-Stocks/#description
Team members
Reyhan Abdul Quayum | Rashed Alneyadi | Sia Chen | Yu Zhang | Chloe Han |
---|---|---|---|---|
Project Structure
-
src/Financiers
Contains the main modules:quotes.py
: Handles operations related to stock quotes.stock.py
: Manages stock data and related functionality.
-
tests
Contains test files for validating the code.test_stock.py
: Tests thestock.py
module.
How to install and use this package
Prerequisites: have latest versions of pip and python installed on your environment.
- Navigate to your project directory.
Create a virtual environment using
pipenv
, and install the latest version of the package with the following command:
pip install pipenv
pipenv install Brainrot-Stocks
And before moving onto the next step, activate the virtual environment:
pipenv shell
- Import the package using the following command inside the file:
from Financiers.stock import Stock
Then, create an instance of Stock class:
stock = Stock()
And you're ready to go! Refer to this example file to see the example usage of package functions inside the code.
- Run the program (replace <example_file> with your actual file name):
python <example_file>.py
Contribute to the project
Prerequisites: have latest versions of pip and python installed on your environment.
Environment Setup
- Clone the repository:
git clone https://github.com/software-students-fall2024/3-python-package-financeeers.git
cd 3-python-package-financeeers
- Install pipenv:
If pipenv
has not been installed, install using the following command:
pip install pipenv
- Create and Activate virtual environment:
pipenv install
pipenv shell
- Add .env file:
create
.env
file in the root directory of the project, and add the following content:
ALPHAVANTAGE_API_KEY = <api_key>
Replace <api_key> with the actual api key, which will be delivered to the admins via discord.
Make contribution
- Modify & Run the file:
Make changes you want to make, and run the files. For example, if you want to run stock.py, run the following command:
python src/Financiers/stock.py
Test & Build
Make sure you are in the virtual environment by running the following command:
pipenv shell
- Test
Run all unit tests with the following command:
pytest
- Build
Build the package using the following command:
python -m build
Then, the artifacts will be produced at dist/
.
If you want to exit the virtual environment, use this comand:
exit
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 brainrot_stocks-0.1.3.tar.gz
.
File metadata
- Download URL: brainrot_stocks-0.1.3.tar.gz
- Upload date:
- Size: 53.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd9f99fbeaedacf62d2b533275d6be101fa9d47989d6ef391445071ecbdf6e41 |
|
MD5 | 095211ae53063e43f9a7171e96ad1fe2 |
|
BLAKE2b-256 | 4534d6ab78367e133fcb55c752a7ae080114a372dcd10318c6f072f6a7a35ee5 |
File details
Details for the file Brainrot_Stocks-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: Brainrot_Stocks-0.1.3-py3-none-any.whl
- Upload date:
- Size: 36.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 356ba8bd41103e4d787a61290f59b7ac284d7d1f194e08c85d8a3cf7a3511ba4 |
|
MD5 | 0005e86f981db68dc8f42e589fc57905 |
|
BLAKE2b-256 | 48f3e31bff51e8180a7183ba719b7cbcbed630545285b04079c12b503ea20dd5 |