My personal python utilities library.
Project description
qwertypy
My personal python utilities library.
Quick links
Installation
pip install qwertypy
Upgrade
pip install --upgrade qwertypy
Usage
- Try on colab: Click here
qwertypy.greetings
import qwertypy.greetings as qpyGreetings
print(qpyGreetings.hello())
qwertypy.tickertape
qwertypy.tickertape.companies
import qwertypy.tickertape.companies as ttCompanies
topCompanies = ttCompanies.getTopCompanies()
print("TOP = ", len(topCompanies))
# print("ALL = ", len(ttCompanies.getAllCompanies()))
ttName = "reliance-industries-RELI"
companyInfo = ttCompanies.getCompanyInfo(ttName)
print(companyInfo)
qwertypy.tickertape.financials
import qwertypy.tickertape.financials as ttFinancials
ttName = "reliance-industries-RELI"
for statementType in ttFinancials.statementTypes:
statement = ttFinancials.getStatement(ttName, statementType)
print(statementType, type(statement))
ttName = "reliance-industries-RELI"
statementType = ttFinancials.statementTypes["income"]
statement = ttFinancials.getStatement(ttName, statementType)
yearsAndValues = ttFinancials.getYearsAndValues(statement, "incDps")
print(yearsAndValues)
qwertypy.data_analysis
qwertypy.data_analysis.regression
import qwertypy.data_analysis.regression as qpyRegression
xTrain = [1, 2, 3, 4, 5, 6]
yTrain = [2, 4, 6, 8, 10, 12]
model = qpyRegression.QpyLinearRegression(xTrain, yTrain)
model.train()
yPredict = model.getPrediction()
print("yPredict: ", yPredict)
xPredict2 = [10, 11]
yExpected = [20, 22]
yPredict2 = model.getPrediction(xPredict2)
print("yPredict2: ", yPredict2)
qwertypy.data_plots
qwertypy.data_plots.trend_plot
import random
import qwertypy.data_plots.trend_plot as qpyTrendPlot
xValues = [i for i in range(10)]
yValues = [random.randint(1, 10) for _ in range(10)]
xTicks = ["xTick" + str(i+1) for i in range(10)]
trendValues = list(yValues)
qpyTrendPlot.trendPlot(
xValues, yValues,
xTicks = xTicks,
rotateXTicks = 90,
xLabel = "xLabel",
yLabel = "yLabel",
plotTitle = "plotTitle",
trendValues = trendValues,
legends = ["trendLegend", "barLegend"],
text = "text",
textBackground = "red",
watermark = "watermark",
showValues = True,
# saveToFile = "testImage.jpg"
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
qwertypy-0.5.4.tar.gz
(7.3 kB
view details)
File details
Details for the file qwertypy-0.5.4.tar.gz
.
File metadata
- Download URL: qwertypy-0.5.4.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93f98c9e233f364ca1dcd1bab0d8643123cf1757af9e9b49fc3cdb90a08cb3df |
|
MD5 | a2c9279d186fcc5b5e87996dd0b71ad4 |
|
BLAKE2b-256 | 880222006f2567f2e87a36fad18d64e010f5259a8e309f2a02be67d341406dab |