Python API Client Example
This example demonstrates how to send an authenticated HTTP request to the
Core API using the requests library.
The example performs a GET request using Bearer token authentication.
Installation
Install the required dependency before running the example:
Example Request
import requests
BASE_URL = "https://website.core-software.co.uk"
TOKEN = "YOUR_TOKEN_HERE"
headers = {
"Authorization": f"Bearer {TOKEN}",
"Content-Type": "application/json",
}
response = requests.get(
f"{BASE_URL}/api/v1",
headers=headers,
)
print(response.status_code)
print(response.json())
Notes
- Replace
YOUR_TOKEN_HEREwith a valid API token before running the example - Authentication is provided using the
Authorization: Bearerheader - The response status code and parsed JSON body are printed to the console
- Error handling has been omitted for simplicity