Skip to main content

financelite

financelite is a lightweight stock information tool that takes every complicated features out.
It only focuses on providing simple and intuitive, yet informative stock information.

Currently, financelite is in a rapidly-evolving state. While I'll try to stay within the boundaries, please understand your implementation may have to change in the future upgrades.

Installation

pip install financelite

Example Usage

News

from financelite import News
from financelite.exceptions import NoNewsFoundException

news = News()
try:
    news.get_news(ticker="gme", count=5)
    # returns 5 GME-related news
except NoNewsFoundException:
    # raised if there aren't any news associated with the ticker.
    pass

Stock

from financelite import Stock
from financelite.exceptions import DataRequestException

stock = Stock(ticker="gme")

try:
    stock.get_chart(interval="1d", range="5d")
    # returns statistics for 5 days, with 1 day interval

    stock.get_live()
    # returns GME's live price and currency
    
    stock.get_hist(data_range="1wk")
    # returns 1 week worth of closed price data
except DataRequestException:
    # raised if ticker, interval, or range values are wrong
    pass
except ValueError:
    # raised if get_hist's days is <= 1 or not int
    pass

Group

from financelite import Group, Stock
from financelite.exceptions import TickerNotInGroupException, DataRequestException, \
    ItemNotValidException

# You can add tickers to the group like this
group = Group()
group.add_ticker("gme")  # it takes in str value, then creates a Stock object with the ticker.
group.add_ticker("bb")
group.add_ticker("amc")

# or you can initialize the group with Stock objects
bb = Stock(ticker="bb")
gme = Stock(ticker="gme")
group = Group([bb, gme])

group.list_tickers()
# returns list of tickers represented as strings

try: 
    group.remove_ticker("ac.to")
except TickerNotInGroupException:
    # raised if ticker does not exist within the group
    pass

try:
    group.get_quotes(cherrypicks=["symbol", "shortName", "regularMarketPrice"])
    # returns a dictionary with only those keys
    
    group.get_quotes(cherrypicks=["symbol", "shortName", "regularMarketPrice"], exclude=True)
    # returns a dictionary with keys except these keys

except DataRequestException:
    # raised if the data request was not successful. Usually means invalid ticker.
    pass
except ItemNotValidException:
    # raised if any item in the cherrypicks list is invalidd
    pass

Special Thanks

Metadata

Release files for financelite 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for financelite 0.1.7
File Size Uploaded
financelite-0.1.7.tar.gz 18.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for financelite 0.1.7
File Interpreter ABI Platform
financelite-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 38.0 kB

Release files / financelite-0.1.7.tar.gz

Download URL financelite-0.1.7.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cda88a7bc96c321630921504dbb4c7ea19aa1091a4530b78a081f98e827ed846
BLAKE2b-256 checksum
How to use checksums
dffbbb40775917b8455e907a9be8f209194c89abac907ffc854602e275aa3936
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/49.1.3 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.5

Release files / financelite-0.1.7-py3-none-any.whl

Download URL financelite-0.1.7-py3-none-any.whl
Size 19.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0df7fe49ed792eac5889829857eab346f85a12d495c964ccbae49f74f78a777e
BLAKE2b-256 checksum
How to use checksums
c3570d4815a34bb4dd418223eec378e2f8eb2c1244dc56dd016546fbc7ea8b30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/49.1.3 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.0.5

2 release files

0.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page