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.0.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.0.tar.gz.
File metadata
- Download URL: tryton_naiad-8.0.0.tar.gz
- Upload date:
- Size: 24.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f70dcc0511487ed38bbf3268b2afaeee4e736e1b7fb17de7574fb854b14723b
|
|
| MD5 |
d0986708f078d87db882b6b59b4d85a6
|
|
| BLAKE2b-256 |
a67eea72752a6ce49eb06efb2712c130d077fc78af75092abeec5cabfa37185b
|
File details
Details for the file tryton_naiad-8.0.0-py3-none-any.whl.
File metadata
- Download URL: tryton_naiad-8.0.0-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.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
729cb04cd17646ccf0935378b427a19abdeb4753d4ea1cbca1f181e68ef87738
|
|
| MD5 |
48be645aa670c1bfeb01f9c98b58ef31
|
|
| BLAKE2b-256 |
ac855dc1e37b167b38999aa18b3c8237457438cb8f62f9d6e63492b32c2f00cd
|