The simple and easy-to-use package for making authenticated Nebri api requests from a python application.
This app is intended for use with a Nebri instance. Visit https://nebrios.com to sign up for free!
This app can be installed via pip:
pip install python-nebri-authentication
NOTE: Before using any classes and associated functions in this package, you must include nebrios-authentication in your Nebri Instance and set up any authentication methods you would like to utilize. See https://github.com/briem-bixly/nebrios-authentication/blob/master/README.md for more information.
NebriToken This is the most basic authentication method supported. This class must be instantiated before use. ``` token_client = NebriToken('instance_name', 'token') ``` - instance name is your Nebri instance name. i.e. https://instance_name.nebrios.com - your token must be generated on your Nebri instance using https://github.com/nebrie/nebrios-authenticationNebriBasic
basic_client = NebriBasic('instance_name', 'username', 'password')
- before using this method, a username and password combo should be saved to your Nebri instance using https://github.com/nebrie/nebrios-authentication
NebriOAuth
oauth_client = NebriOAuth('instance_name', access_token='access_token', consumer_key='consumer_key', consumer_secret='consumer_secret')
- consumer key and consumer secret should be obtained from your Nebri instance using https://github.com/nebrie/nebrios-authentication
- if you have already created an access token, consumer key and consumer secret are not required
- if you have not created an access token, only consumer key and consumer secret are required. this app will make the appropriate call for an access token and will save the generated token to your NebriAuth instance automatically.
api_request
- api_module: the name of the api module stored on your Nebri instance
- view_name: the name of the target function contained in the given api module
- method: the desired HTTP request method
- headers (optional): any custom headers you would like added to your request
- payload (optional): an object containing params and values
- files (optional): any files that you would like to upload via a POST request