Website • Docs • API Reference • User Guide • Demo • Contribute
This codebase is a work-in-progress. The repo is here as a placeholder for anyone interested in contributing to the software development kit. Pull-requests and contributions are welcome!
Simply install the package from the root directory with:
pip install .
from directus_api import DirectusClient
url = "http:https://123.45.678.90:8080"
project = "Directus"
# Creates a Directus client object
client = DirectusClient(url, project)
# Create a Directus client from a user (generates access token)
client = DirectusClient(url, project, email="[email protected]", password="password")
# Get a list of all items in a collection
client.get_items_list("photos")
# Get a specific item in a collection by id
client.get_item("photos", 1)
# Get a list of all files (requires full constructor with email and password)
client.get_files_list()
# Get a specific file (requires full constructor with email and password)
client.get_file(1)
# Create a new item in a collection (requires full constructor with email and password)
item = {name: "Directus", id: 1}
client.create_item("collection_name", item)
Directus is released under the GPLv3 license. RANGER Studio LLC owns all Directus trademarks and logos on behalf of our project's community. Copyright © 2006-2018, RANGER Studio LLC.