dict
REST API of the SYSNET managed dictionaries (code lists) system. Primarily designed for the CITES Registry.
This Python package is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
Requirements.
Python 2.7 and 3.4+
Installation & Usage
pip install
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)
Then import the package:
import dict
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install to install the package for all users)
Then import the package:
import dict
Getting Started
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import dict
from dict.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiKey
configuration = dict.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = dict.AdminsApi(dict.ApiClient(configuration))
dictionary = 'dictionary_example' # str | Dictionary identifier
key = 'key_example' # str | Descriptor key or alternate key
active = True # bool | activate/deactivate descriptor
try:
# activates/deactivates the descriptor by key
api_response = api_instance.activate_descriptor(dictionary, key, active)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminsApi->activate_descriptor: %s\n" % e)
# Configure API key authorization: apiKey
configuration = dict.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = dict.AdminsApi(dict.ApiClient(configuration))
dictionary = 'dictionary_example' # str | Dictionary identifier
body = dict.Descriptor() # Descriptor | Descriptor to add (optional)
try:
# adds an descriptor
api_instance.add_descriptor(dictionary, body=body)
except ApiException as e:
print("Exception when calling AdminsApi->add_descriptor: %s\n" % e)
# Configure API key authorization: apiKey
configuration = dict.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = dict.AdminsApi(dict.ApiClient(configuration))
dictionary = 'dictionary_example' # str | Dictionary identifier
key = 'key_example' # str | Descriptor key or alternate key
try:
# removes a descriptor
api_response = api_instance.delete_descriptor(dictionary, key)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminsApi->delete_descriptor: %s\n" % e)
# Configure API key authorization: apiKey
configuration = dict.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = dict.AdminsApi(dict.ApiClient(configuration))
try:
# exports all descriptors from the system
api_response = api_instance.export_all()
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminsApi->export_all: %s\n" % e)
# Configure API key authorization: apiKey
configuration = dict.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = dict.AdminsApi(dict.ApiClient(configuration))
dictionary = 'dictionary_example' # str | Dictionary identifier
try:
# exports all descriptors from specifies dictionary
api_response = api_instance.export_dictionary(dictionary)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminsApi->export_dictionary: %s\n" % e)
# Configure API key authorization: apiKey
configuration = dict.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = dict.AdminsApi(dict.ApiClient(configuration))
body = [dict.Descriptor()] # list[Descriptor] | Array of descriptors to import (optional)
replace = True # bool | replaces whole database (optional)
try:
# imports descriptors of several directories
api_response = api_instance.import_descriptors(body=body, replace=replace)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminsApi->import_descriptors: %s\n" % e)
# Configure API key authorization: apiKey
configuration = dict.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = dict.AdminsApi(dict.ApiClient(configuration))
dictionary = 'dictionary_example' # str | Dictionary identifier
body = [dict.Descriptor()] # list[Descriptor] | Array of descriptors to import (optional)
replace = True # bool | replaces existing dictionary (optional)
try:
# imports a dictionary
api_response = api_instance.import_dictionary(dictionary, body=body, replace=replace)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminsApi->import_dictionary: %s\n" % e)
# Configure API key authorization: apiKey
configuration = dict.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = dict.AdminsApi(dict.ApiClient(configuration))
dictionary = 'dictionary_example' # str | Dictionary identifier
key = 'key_example' # str | Descriptor key or alternate key
body = dict.Descriptor() # Descriptor | Descriptor to replace (optional)
try:
# replaces a descriptor
api_response = api_instance.put_descriptor(dictionary, key, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminsApi->put_descriptor: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://virtserver.swaggerhub.com/SYSNET/dictionary/1.0.0
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AdminsApi | activate_descriptor | GET /{dictionary}/{key}/activate | activates/deactivates the descriptor by key |
| AdminsApi | add_descriptor | POST /{dictionary} | adds an descriptor |
| AdminsApi | delete_descriptor | DELETE /{dictionary}/{key} | removes a descriptor |
| AdminsApi | export_all | GET /export | exports all descriptors from the system |
| AdminsApi | export_dictionary | GET /{dictionary}/export | exports all descriptors from specifies dictionary |
| AdminsApi | import_descriptors | POST /import | imports descriptors of several directories |
| AdminsApi | import_dictionary | POST /{dictionary}/import | imports a dictionary |
| AdminsApi | put_descriptor | PUT /{dictionary}/{key} | replaces a descriptor |
| DevelopersApi | info_api | GET /info | gets service info |
| PublicApi | get_descriptor | GET /{dictionary}/{key} | gets a descriptor by key |
| PublicApi | search_dictionary | GET /{dictionary} | searches dictionary (autocomplete) |
Documentation For Models
Documentation For Authorization
apiKey
- Type: API key
- API key parameter name: X-API-KEY
- Location: HTTP header
Author
Metadata
Release files for sysnet-dict 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sysnet-dict-1.0.0.tar.gz | 31.5 kB | Without provenance | Details for sysnet-dict-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sysnet_dict-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for sysnet_dict-1.0.0-py3-none-any.whl |
Total release size: 72.5 kB
Release files / sysnet-dict-1.0.0.tar.gz
| Download URL | sysnet-dict-1.0.0.tar.gz |
|---|---|
| Size | 31.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cbf2bb3541c1b075417ad5ab5b559fd2c0fa4d96cd583b6850237229117c8046
|
|
BLAKE2b-256 checksum How to use checksums |
5a0144d85e85097875a928341d9d8055de38edc23174cdb6ac59f5ede20e74b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.4
|
Release files / sysnet_dict-1.0.0-py3-none-any.whl
| Download URL | sysnet_dict-1.0.0-py3-none-any.whl |
|---|---|
| Size | 41.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08aa0a28750f7cbd91c9377a1a02a987b3c7ee6b42b53b30813024f3bcac3307
|
|
BLAKE2b-256 checksum How to use checksums |
44814f258d3b5d72e76d5f318286b98fd183269fcc53013ace4fd132292f4372
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.4
|
Security for sysnet-dict 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.