Library to access Tryton's REST API
Project description
A library to access Tryton’s REST API.
Example of usage
>>> from naiad import Client, Record
Configuration
>>> import os
>>> url = os.environ.get('NAIAD_URL', 'https://localhost:8000/:memory:')
>>> client = Client(url, os.getenv('NAIAD_KEY'))
Creating a new group
>>> group = Record('res.group')
>>> group.name = "New Group"
>>> group = client.store(group)
>>> group.id >= 0
True
Searching a user
>>> admin, = client.search(
... 'res.user', [('login', '=', 'admin')], fields=['login'])
>>> admin.login
'admin'
Modifying a user
>>> admin.signature = "Administrator" >>> admin.groups = [group] >>> admin = client.store(admin, fields=['signature', 'groups.id']) >>> admin.signature 'Administrator' >>> group in admin.groups True
Calling an action
>>> _ = client.action(admin, 'reset_password')
Fetching a report
>>> filename, content = client.report('res.user.email_reset_password', admin.id)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tryton_naiad-8.0.1.tar.gz
(24.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tryton_naiad-8.0.1.tar.gz.
File metadata
- Download URL: tryton_naiad-8.0.1.tar.gz
- Upload date:
- Size: 24.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3a09b6e8ce3db8d759baf366e4642c6cbd7ae7e1bf07d778b06e8343f9c0106
|
|
| MD5 |
13fec6e29b8e19e65544887f62ec60fd
|
|
| BLAKE2b-256 |
9bf3c393d8a3d7a7d083933874efe3da4edd2e60b11b2e884391ed2459c89c57
|
File details
Details for the file tryton_naiad-8.0.1-py3-none-any.whl.
File metadata
- Download URL: tryton_naiad-8.0.1-py3-none-any.whl
- Upload date:
- Size: 30.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8bbd2b3d6c3bc040df7aeab4151493eb7f51f22abdf349869191d9389955fe0
|
|
| MD5 |
ba3b6ac03ed46a4871e00e6bb25dfe15
|
|
| BLAKE2b-256 |
6d7924b3cfd5de90f3097045f9af9d2cf6b561b712584c800e8f4bd8892a4fe8
|