Portable Python package to connect with the Tribe web service at the University of Pennsylvania
Project description
Tribe client is a portable Python app to connect your bioinformatics server or tool to the ‘Tribe’ web service (located at https://tribe.greenelab.com).
This package allows web servers created using Django to connect directly to Tribe and make use of its resources. Users of the client web server or tool can access their Tribe resources via Tribe OAuth2 authentication.
Download and Install
Tribe-client is registered as “tribe-client” in PyPI and is pip installable:
pip install tribe-client
Quick Start with Django
Add tribe_client to your INSTALLED_APPS setting:
INSTALLED_APPS = (
...
'tribe_client',
)
2. Include the tribe-client URLconf in your project’s URLconf (usually urls.py):
from django.conf.urls import url, patterns, include
urlpatterns = patterns('',
...
(r'^tribe_client/', include('tribe_client.urls')),
)
3. Register your client server at https://tribe.greenelab.com/oauth2/applications/. Make sure to:
Be logged-in using your Tribe account
Select “Confidential” under Client type and
Select “Authorization Code” under Authorization grant type
Enter your client server’s address plus “/tribe_client/get_token” in the Redirect uris box. If your client server’s current address is http://example.com, enter http://example.com/tribe_client/get_token
4. Write down the Client ID in the TRIBE_ID setting and the Client secret in the TRIBE_SECRET setting in your settings.py file like so:
TRIBE_ID = '*****Tribe Client ID*****'
TRIBE_SECRET = '*****Tribe Client Secret*****'
5. The TRIBE_REDIRECT_URI setting should be the address of the client server plus “/tribe_client/get_token”.
TRIBE_REDIRECT_URI = 'http://example.com/tribe_client/get_token'
6. Make sure that you have a base.html template that the tribe_client templates can extend
7. Make a link that takes the user to the /tribe_client url of your website for them to log in using Tribe
A Closer Look
Under the hood, tribe-client has functions that:
1) Get an access token (via the OAuth2 protocol) that allows users to access and create resources in Tribe.
2) Retrieves public and private collections (and their versions) and displays them on the client server using views and templates included in the package.
3) Allows users to create new collections and versions remotely, from the client server.
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 tribe-client-1.1.3.tar.gz
.
File metadata
- Download URL: tribe-client-1.1.3.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 911b7c0e9808e49f50740f8f6e450f99bdaba23fd4458ed6ebfc4c47aa049a30 |
|
MD5 | 2775a497b26aa7dcd19662c6bad41da0 |
|
BLAKE2b-256 | bd793f1bfa70517f992b0117b46d4270cb286d4640932f3b68cfc89ec4e91176 |