Integrate openhub APIs with Django
Documentation
The full documentation is at https://openhub-django.readthedocs.io.
Quickstart
Install openhub-django:
pip install openhub-django
Add it to your
INSTALLED_APPS:
INSTALLED_APPS = (
...
'openhub_django.apps.OpenhubDjangoConfig',
...
)
Add openhub-django’s URL patterns:
urlpatterns = [
...
url(r'^', include('openhub_django.urls')),
...
]
Configure following environment variables:
OpenHub Token
How to get OpenHub Token?
Signup with GitHub on OpenHub
Go to your profile settings to create a new API Key.
Choose “API Keys” from the section and create a new one by clicking on button “Request New API Key”
Fill in the required fields and Save it.
Copy the
API Keyfor the generated token to add it to your environment.
Add it to your Linux (or Ubuntu) environment-
Open the terminal and run cat ~/.bashrc.
Find this peice of code
if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fiIn this case we will create a new file in
$HOMEdirectory named.bash_aliasesto store our environment variables. As it will execute everytime we open a new terminal window.
vi ~/.bash_aliasesEnter into the insert mode and add the value of token that you generated from OpenHub settings.
export OH_TOKEN=<PASTE THE COPIED API KEY OF TOKEN>Exit the insert mode by pressing
esckey and the editor.Restart your terminal and run
printenvto verify the API Key added.
Organization name
Set the environment variable
ORG_NAMEfollowing the above mentioned steps like you did adding the environment variableOH_TOKEN. Once you setup these two environment variables, you’re ready to run a management command to fetch the organization related information from OpenHub.
Run management command
python manage.py migrate
python manage.py import_openhub_data
View the fetched data:
python manage.py runserver
# Open http://127.0.0.1:8000/openhub/ in browser
Features
Import all the organization portfolio projects data
Import all the organization outside projects data such as dependencies
Import all the affiliated committers data who made contributions to the projects
Import all the outside committers data
Import the organization related information
Generate the static web-pages of all the imported data with an interactive UI/UX design.
Running Tests
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install tox (myenv) $ tox
Credits
Tools used in rendering this package:
History
0.1.0 (2018-08-14)
First release on PyPI.
Metadata
Release files for openhub-django 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 |
|---|---|---|---|---|
| openhub-django-0.1.0.tar.gz | 16.8 kB | Without provenance | Details for openhub-django-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openhub_django-0.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for openhub_django-0.1.0-py2.py3-none-any.whl |
Total release size: 42.5 kB
Release files / openhub-django-0.1.0.tar.gz
| Download URL | openhub-django-0.1.0.tar.gz |
|---|---|
| Size | 16.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22ac0e91ac01878a0d10cd01aedc04db4d76c682698fffe7073fec2faecf5dc5
|
|
BLAKE2b-256 checksum How to use checksums |
a316b72b49f0cad5a3e1e5befee732e511138a894f89af1adbbe3de933a85fd8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.9
|
Release files / openhub_django-0.1.0-py2.py3-none-any.whl
| Download URL | openhub_django-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 25.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
771d3ec318f16daddbebda8c9923ff29e41b213bdf7fb5734b33e2eb760d8d73
|
|
BLAKE2b-256 checksum How to use checksums |
46da22e015528d506a3dcaffd29cd68db9b20e7c30919558b9eb57b033d75a78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.9
|
Security for openhub-django 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.