Skip to main content

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

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.

FYI: This package will be release in the Python Package Index, so, once done by using

pip install ghtrack

should be enough.

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 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 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

GhTrack-1.0.0.tar.gz (13.9 kB view details)

Uploaded Source

File details

Details for the file GhTrack-1.0.0.tar.gz.

File metadata

  • Download URL: GhTrack-1.0.0.tar.gz
  • Upload date:
  • Size: 13.9 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

Hashes for GhTrack-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f65f87c9adcbaabf461190ece4c9185a08c34676478688d7c87976f0d8bd5908
MD5 f606805df90ba9268ebbdf2417bd5628
BLAKE2b-256 5e3581da742afeb601489b574e02b59e3ab1234487853375d39c1b6d03e7672d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page