Description
Call and monitor dozens of APIs by using the Bearer API client for Python.
Bearer Python alternatives and similar packages
Based on the "HTTP" category.
Alternatively, view Bearer Python alternatives based on common mentions on social networks and blogs.
-
httplib2
Small, fast HTTP client library for Python. Features persistent connections, cache, and Google App Engine support. Originally written by Joe Gregorio, now supported by community. -
AnyAPI
DISCONTINUED. AnyAPI is a library that helps you to write any API wrapper with ease and in pythonic way. -
kiss-headers
Python package for HTTP/1.1 style headers. Parse headers to objects. Most advanced available structure for http headers. -
urllib3.future
urllib3.future is the supercharged low level http client we dreamed of. Support HTTP/1.1, HTTP/2, and HTTP/3 with multiplexed connections! Also WebSocket, and SSE. And DNS over QUIC, TLS, HTTPS and UDP. DNSSEC Protected & Async! -
sensei
The Python framework that provides a quick way to build robust HTTP requests and best API clients. Use type hints, to build requests, with little or no implementation.
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Bearer Python or a related project?
README
Bearer Python
Bearer Python client
Installation
pip install bearer
Usage
Get your Bearer Secret Key and integration id from the Dashboard and use the Bearer client as follows:
Calling any APIs
from bearer import Bearer
bearer = Bearer('BEARER_SECRET_KEY') # find it on https://app.bearer.sh/keys
github = (
bearer
.integration('your integration id') # you'll find it on the Bearer dashboard https://app.bearer.sh
.auth('your auth id') # Create an auth id for your integration via the dashboard
)
print(github.get('/repositories').json())
We use requests internally and we
return the response from this library from the request methods (request
,
get
, head
, post
, put
, patch
, delete
).
More advanced examples:
# With query parameters
print(github.get('/repositories', query={ 'since': 364 }).json())
# With body data
print(github.post('/user/repos', body={ 'name': 'Just setting up my Bearer.sh' }).json())
Setting the request timeout, and other http client settings
Bearer client is written on top of excellent requests library. Bearer provides reasonable defaults but you can adjust http client configuration by using any keyword argument which is accepted by requests.request method using http_client_settings
keyword argument.
By default bearer client times out after 5 seconds. Bearer allows to increase the timeout to up to 30 seconds
from bearer import Bearer
bearer = Bearer('BEARER_SECRET_KEY', http_client_settings={"timeout": 10}) # increase the request timeout to 10 seconds globally
# you can specify client settings per integration as well
github = bearer.integration('github', http_client_settings={"timeout": 2}) # github api is super fast 2 seconds should be plenty
print(github.get('/user/repos'))
Development
# setup venv
$ python -m venv venv
# install dependencies
$ venv/bin/python setup.py develop
# start the console
$ venv/bin/python