Package Overview
This contains functions to help me get data from several sources:
- OpenAI's ChatGPT
- Bureau of Labor Statistics (BLS)
- See example here: https://www.bls.gov/developers/api_python.htm#python2
- Signatures: https://www.bls.gov/developers/api_signature_v2.htm
API Keys
You'll need to make sure that you obtain API keys. Store them as environment variables so that you do not have to share your API key in your code. An environment variable resides on your computer, so you'll have to save them on each computer that you use.
The way you set it differs between Mac/Linux and Windows.
Approach using terminal for Mac
This creates a line in the .zshrc file:
echo "export OPEN_API_KEY=<apiKey>" >> ~/.zshrc
Test if it exists: cat ~./zshrc
Set it permanently: source ~/.zshrc
Get environment variables like this:
os.environ['OPENAI_KEY']
or
os.environ.get("OPEN_API_KEY")
Other useful notes
Github workflow
git status git pull git add file.txt or git add . git commit -m "message" git push
Finding folder where packages are located
import sys; sys.path help('modules')
Metadata
Release files for my-apis 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| my_apis-0.1.0.tar.gz | 12.9 kB | Without provenance | Details for my_apis-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| my_apis-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for my_apis-0.1.0-py3-none-any.whl |
Total release size: 25.2 kB
Release files / my_apis-0.1.0.tar.gz
| Download URL | my_apis-0.1.0.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2128f5d202da1985a448521c83e43de6f8245c2e9752cf5c237384912aff83b
|
|
BLAKE2b-256 checksum How to use checksums |
ebf2395b40dce0df190c4830302b13ce5bcf91b7d47daa8d268278cd91ede791
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.0
|
Release files / my_apis-0.1.0-py3-none-any.whl
| Download URL | my_apis-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
745d8ba2b88c60b0e2f091c73df60032d525a57491e492758ff665d5faa9ba9b
|
|
BLAKE2b-256 checksum How to use checksums |
d48735fe29a0f4d691104f64e68e210f196679a783226387df8476f73d96f75a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.0
|
Security for my-apis 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.