An Python module api app
Project description
Introduction
github-track is a Python library to use the Github API v3. With it, you can pull any public repositories pull requests from Python scripts. Sending email currently work only with sendGrid The full documentation can be found here github-track full docs In the examples section of the docs, you can learn how to parse a configuration file to the module and much more.
Download and install
First of all make sure you have install python in your machine and the version is higher than 3.6. If not please process as follow to install it.
brew install python@3.9
Installation using pip
The easiest way to install is to use Python Package Index, so, a pip install should be enough.
pip3 install GhTrack
Installation by cloning the source code If you have done the installation using pip, you can ignore this part. To use it please clone the github-track repository.
git clone https://github.com/zinaLacina/github-track
Once it clone please cd into the directory
cd github-track
Once inside the direction check that you have the latest up to date of the setuptools.
python3 -m pip install --upgrade setuptools
And lastly install the module
python3 setup.py install
And you are all set for to run the application.
Short tutorial
Let's test the base features of the module, that consist to pull the last 7 days pull requests of a public repo. By default the module has default value in the settings located in the data folder. The default repo is kubernetes. So to get the list of the last 7 days pull requests of the kubernetes repo.
Open a terminal, and in the console please type.
>> python3
After that, import the GhTrack module
>> from ghtrack.GhTrack import GhTrack
# create GhTrack object without any params(first of all the default params)
>> g = GhTrack()
#Print on the console the html of the last 7 days pull requests
>> g.sendEmailOrPrintConsole(emailNotConsole=False)
You can also get the json format of the last 7 days pull requests
>> from ghtrack.GhTrack import GhTrack
>> g = GhTrack()
>> pulls = g.getPulls()
#Print the json format
>> pulls
Then play with your GhTrack objects:
>> for pull in pulls:
>> ...print(pull["title"])
Licensing
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org>
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
File details
Details for the file GhTrack-1.1.1.tar.gz.
File metadata
- Download URL: GhTrack-1.1.1.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dad3b39f8e5d44f42974d97704e49f844f807695cda2144fa49162948403a63
|
|
| MD5 |
447797609479c682ed38aa4fa853fd86
|
|
| BLAKE2b-256 |
c26de299ab3f9bb2509d71211810fd73f9e80bbd5212a0b822182ef4dd62a344
|