This release is a pre-release and may not be stable for production use.
Exercise2: GitHub Command line interface (CLI)
Purpose
This is the second exercise for the professional python course. The purpose is to build a proper CLI using the github API. The task is (copied from the professional python course):
Create a python program to interact with GitHub and retrieve data. Add the following commands:
- Count all stars of all repos of yourself, a specified user or an organization.
- Print out details about yourself, a user or organization. Allow a nicely printed format as default and offer output as json too.
- One of the following:
- (easy) Modify your user description by adding a tea emoji and a heart.
- (difficult) Set your user status (top-right when clicking on username) to a tea emoji with the message "Drinking Tea".
Focus points:
- End-users will use your program so focus on usability
- Integrate previous lessons as much as it makes sense
Quickstart
Installing
This repository uses poetry to install the dependencies and taskfile to execute the most basic functionality.
After having installed taskfile onto your system you can simply use task install to install the necessary dependendcies into a virtual environment. 4
Besides the dependencies you will need a GitHub Access Token to use this program. Get it here.
Usage
Promt task to get a list of the tasks availabe and go for one of the options:
$ task
task: Available tasks for this project:
* build: Builds the puthon package
* docs-publish: Publish the documentation to gh-pages
* docs-serve: Serve the documentation locally
* getdetails: Get details of a given user and print it to console
* getdetailsjson: Get details of a given user in json
* install: Installs the dependecies based on the poetry file
* lint: Runs formatting and linting
* sbom: Generate the Software Bill of Materials
* stars: Get the number of stars of the given user's repositories
* starsjson: Get the number of stars of the given user's repositories in json format
* status: Set the status of your user to something delicous
* test: Runs tests on the code
The other way of using this tool is directly with calling etiher poetry or native python to start on of the functions, like
poetry run python professional_python_exercises_2_githubcli/github_cli.py setstatus
Metadata
Release files for professional-python-exercises-2-githubcli 0.1.0a0
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 |
|---|---|---|---|---|
| professional_python_exercises_2_githubcli-0.1.0a0.tar.gz | 6.3 kB | Without provenance | Details for professional_python_exercises_2_githubcli-0.1.0a0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| professional_python_exercises_2_githubcli-0.1.0a0-py3-none-any.whl | Python 3 | none | any | Details for professional_python_exercises_2_githubcli-0.1.0a0-py3-none-any.whl |
Total release size: 13.1 kB
Release files / professional_python_exercises_2_githubcli-0.1.0a0.tar.gz
| Download URL | professional_python_exercises_2_githubcli-0.1.0a0.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
02acb7e988ca90efec84a14d389b693cd9a788fcec0bc4386fc8680bfaa617ee
|
|
BLAKE2b-256 checksum How to use checksums |
5effba95fc31d9dec1370713e43bc20c1a5a31fbb354dabc10129e5f7d2c95fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.8
|
Release files / professional_python_exercises_2_githubcli-0.1.0a0-py3-none-any.whl
| Download URL | professional_python_exercises_2_githubcli-0.1.0a0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62fe5c467e5ff2606c2cc9f4ce486079982f6c065f7bde6b272f4dfc66cbcf53
|
|
BLAKE2b-256 checksum How to use checksums |
fd406547fb88586037467d86afb373b20dd0d96ca6628a9796d51c3a57a2fa8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.8
|
Security for professional-python-exercises-2-githubcli 0.1.0a0
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.