Skip to main content

Get stock data with unwanted brainrot in your Python app.

Project description

Build & Test

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/0.1.0/#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 the stock.py module.

How to install and use this package

Prerequisites: have latest versions of pip and python installed on your environment.

  1. 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
  1. 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.

  1. 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

  1. Clone the repository:
git clone https://github.com/software-students-fall2024/3-python-package-financeeers.git
cd 3-python-package-financeeers
  1. Install pipenv:

If pipenv has not been installed, install using the following command:

pip install pipenv
  1. Create and Activate virtual environment:
pipenv install
pipenv shell
  1. 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

  1. 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
  1. Test

Run all unit tests with the following command:

pytest
  1. 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

brainrot_stocks-0.1.1.tar.gz (53.3 kB view details)

Uploaded Source

Built Distribution

Brainrot_Stocks-0.1.1-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

File details

Details for the file brainrot_stocks-0.1.1.tar.gz.

File metadata

  • Download URL: brainrot_stocks-0.1.1.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

Hashes for brainrot_stocks-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7b59d0a5abdd764b21b31ff7042984f1fc5d6eeabed7cb8ab225dc12927ba9fc
MD5 9c07a53387f4efaab7d1e3dca6d80ddb
BLAKE2b-256 755a4ec227f6c94e01c572bf3900d6408655972bcbeaeb2cdf44ce0506d4fa8a

See more details on using hashes here.

File details

Details for the file Brainrot_Stocks-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for Brainrot_Stocks-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56c204d4f099b905b0fbe99c0f91d2665ac09af585cec912d1139f4cb3a0a6a7
MD5 5bf852f627ddeaf9ef3168f101d23089
BLAKE2b-256 bc4c8e651073ccb98356e76c50dcd8e530f1df94bc395b4f3a358f5fddd9bc36

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page