Skip to content

Directus Python SDK — Python Software Development Kit

Notifications You must be signed in to change notification settings

shasha79/sdk-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Directus Logo

Directus Python SDK

 

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!

 

Installation

Simply install the package from the root directory with:

pip install .

Usage

from directus_api import DirectusClient

url = "http://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@example.com", 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.

About

Directus Python SDK — Python Software Development Kit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 100.0%