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.4.tar.gz
.
File metadata
- Download URL: brainrot_stocks-0.1.4.tar.gz
- Upload date:
- Size: 53.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91b6af153f3a836b7e319c1f0ee7dda938bb0af52d4d9831d7fc1c8ac56450c0 |
|
MD5 | 17c1b41a0aa9a404e0665f669d5b5270 |
|
BLAKE2b-256 | 1bbf1e14f82623dce77c40be3a7317abd8bc6769c5c4913cb82757462cf8413e |
File details
Details for the file Brainrot_Stocks-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: Brainrot_Stocks-0.1.4-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 | 9226f2b2b8d06e20cf2b94f895d0a219c90eb5bd695f83e0cc7f0bb62002cab9 |
|
MD5 | 8e5b042022ccc9f1b393679ccc6a8ea3 |
|
BLAKE2b-256 | d32256fa15fe20e25510112315521c601e3b2579f7a3a5a83712f0c68ff85368 |