trilium-client


Nametrilium-client JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummaryTrilium ETAPI client generated by OpenAPI Generator
upload_time2023-08-05 23:23:59
maintainer
docs_urlNone
authormm21
requires_python>=3.7,<4.0
licenseApache 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            This is an auto-generated client for [Trilium](https://github.com/zadam/trilium). It builds an API client using the `etapi.openapi.yaml` provided by Trilium.

It's a simple Poetry project with a build script to invoke the [OpenAPI Generator](https://openapi-generator.tech) and extract dependencies. The generated `trilium_client`, `docs`, and `README.md` artifacts are packaged and many unused files are ignored.

To build this project, activate a shell: (recommended)

```sh
poetry shell
````

And run:

```sh
poetry install --with=dev
scons
````

To clean, run:

```sh
scons --clean
````

Following is the README produced by the generator.

# trilium-client
External Trilium API

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.0.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.PythonNextgenClientCodegen
For more information, please visit [https://github.com/zadam/trilium](https://github.com/zadam/trilium)

## Requirements.

Python 3.7+

## Installation & Usage
### pip install

If the python package is hosted on a repository, you can install directly using:

```sh
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:
```python
import trilium_client
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import trilium_client
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python
from __future__ import print_function

import time
import trilium_client
from trilium_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:37740/etapi
# See configuration.py for a list of all supported configuration parameters.
configuration = trilium_client.Configuration(
    host = "http://localhost:37740/etapi"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: EtapiTokenAuth
configuration.api_key['EtapiTokenAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['EtapiTokenAuth'] = 'Bearer'

# Configure HTTP basic authorization: EtapiBasicAuth
configuration = trilium_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)


# Enter a context with an instance of the API client
with trilium_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = trilium_client.DefaultApi(api_client)
    backup_name = 'backup_name_example' # str | If the backupName is e.g. \"now\", then the backup will be written to \"backup-now.db\" file

    try:
        api_instance.create_backup(backup_name)
    except ApiException as e:
        print("Exception when calling DefaultApi->create_backup: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *http://localhost:37740/etapi*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**create_backup**](docs/DefaultApi.md#create_backup) | **PUT** /backup/{backupName} | 
*DefaultApi* | [**create_note**](docs/DefaultApi.md#create_note) | **POST** /create-note | 
*DefaultApi* | [**create_revision**](docs/DefaultApi.md#create_revision) | **POST** /notes/{noteId}/revision | 
*DefaultApi* | [**delete_attribute_by_id**](docs/DefaultApi.md#delete_attribute_by_id) | **DELETE** /attributes/{attributeId} | 
*DefaultApi* | [**delete_branch_by_id**](docs/DefaultApi.md#delete_branch_by_id) | **DELETE** /branches/{branchId} | 
*DefaultApi* | [**delete_note_by_id**](docs/DefaultApi.md#delete_note_by_id) | **DELETE** /notes/{noteId} | 
*DefaultApi* | [**export_note_subtree**](docs/DefaultApi.md#export_note_subtree) | **GET** /notes/{noteId}/export | 
*DefaultApi* | [**get_app_info**](docs/DefaultApi.md#get_app_info) | **GET** /app-info | 
*DefaultApi* | [**get_attribute_by_id**](docs/DefaultApi.md#get_attribute_by_id) | **GET** /attributes/{attributeId} | 
*DefaultApi* | [**get_branch_by_id**](docs/DefaultApi.md#get_branch_by_id) | **GET** /branches/{branchId} | 
*DefaultApi* | [**get_day_note**](docs/DefaultApi.md#get_day_note) | **GET** /calendar/days/{date} | 
*DefaultApi* | [**get_inbox_note**](docs/DefaultApi.md#get_inbox_note) | **GET** /inbox/{date} | 
*DefaultApi* | [**get_month_note**](docs/DefaultApi.md#get_month_note) | **GET** /calendar/months/{month} | 
*DefaultApi* | [**get_note_by_id**](docs/DefaultApi.md#get_note_by_id) | **GET** /notes/{noteId} | 
*DefaultApi* | [**get_note_content**](docs/DefaultApi.md#get_note_content) | **GET** /notes/{noteId}/content | 
*DefaultApi* | [**get_week_note**](docs/DefaultApi.md#get_week_note) | **GET** /calendar/weeks/{date} | 
*DefaultApi* | [**get_year_note**](docs/DefaultApi.md#get_year_note) | **GET** /calendar/years/{year} | 
*DefaultApi* | [**import_zip**](docs/DefaultApi.md#import_zip) | **POST** /notes/{noteId}/import | 
*DefaultApi* | [**login**](docs/DefaultApi.md#login) | **POST** /auth/login | 
*DefaultApi* | [**logout**](docs/DefaultApi.md#logout) | **POST** /auth/logout | 
*DefaultApi* | [**patch_attribute_by_id**](docs/DefaultApi.md#patch_attribute_by_id) | **PATCH** /attributes/{attributeId} | 
*DefaultApi* | [**patch_branch_by_id**](docs/DefaultApi.md#patch_branch_by_id) | **PATCH** /branches/{branchId} | 
*DefaultApi* | [**patch_note_by_id**](docs/DefaultApi.md#patch_note_by_id) | **PATCH** /notes/{noteId} | 
*DefaultApi* | [**post_attribute**](docs/DefaultApi.md#post_attribute) | **POST** /attributes | 
*DefaultApi* | [**post_branch**](docs/DefaultApi.md#post_branch) | **POST** /branches | 
*DefaultApi* | [**post_refresh_note_ordering**](docs/DefaultApi.md#post_refresh_note_ordering) | **POST** /refresh-note-ordering/{parentNoteId} | 
*DefaultApi* | [**put_note_content_by_id**](docs/DefaultApi.md#put_note_content_by_id) | **PUT** /notes/{noteId}/content | 
*DefaultApi* | [**search_notes**](docs/DefaultApi.md#search_notes) | **GET** /notes | 


## Documentation For Models

 - [AppInfo](docs/AppInfo.md)
 - [Attribute](docs/Attribute.md)
 - [Branch](docs/Branch.md)
 - [CreateNoteDef](docs/CreateNoteDef.md)
 - [Error](docs/Error.md)
 - [Login201Response](docs/Login201Response.md)
 - [LoginRequest](docs/LoginRequest.md)
 - [Note](docs/Note.md)
 - [NoteWithBranch](docs/NoteWithBranch.md)
 - [SearchResponse](docs/SearchResponse.md)


## Documentation For Authorization


## EtapiTokenAuth

- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header


## EtapiBasicAuth

- **Type**: HTTP basic authentication


## Author

zadam.apps@gmail.com



            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "trilium-client",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "mm21",
    "author_email": "mm21.apps@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/1c/d9/d7d19b830b4b0bd6836bd954bbfde66e9d49ddb886078d077bc6c67b166e/trilium_client-0.1.0.tar.gz",
    "platform": null,
    "description": "This is an auto-generated client for [Trilium](https://github.com/zadam/trilium). It builds an API client using the `etapi.openapi.yaml` provided by Trilium.\n\nIt's a simple Poetry project with a build script to invoke the [OpenAPI Generator](https://openapi-generator.tech) and extract dependencies. The generated `trilium_client`, `docs`, and `README.md` artifacts are packaged and many unused files are ignored.\n\nTo build this project, activate a shell: (recommended)\n\n```sh\npoetry shell\n````\n\nAnd run:\n\n```sh\npoetry install --with=dev\nscons\n````\n\nTo clean, run:\n\n```sh\nscons --clean\n````\n\nFollowing is the README produced by the generator.\n\n# trilium-client\nExternal Trilium API\n\nThis Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:\n\n- API version: 1.0.0\n- Package version: 1.0.0\n- Build package: org.openapitools.codegen.languages.PythonNextgenClientCodegen\nFor more information, please visit [https://github.com/zadam/trilium](https://github.com/zadam/trilium)\n\n## Requirements.\n\nPython 3.7+\n\n## Installation & Usage\n### pip install\n\nIf the python package is hosted on a repository, you can install directly using:\n\n```sh\npip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git\n```\n(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)\n\nThen import the package:\n```python\nimport trilium_client\n```\n\n### Setuptools\n\nInstall via [Setuptools](http://pypi.python.org/pypi/setuptools).\n\n```sh\npython setup.py install --user\n```\n(or `sudo python setup.py install` to install the package for all users)\n\nThen import the package:\n```python\nimport trilium_client\n```\n\n## Getting Started\n\nPlease follow the [installation procedure](#installation--usage) and then run the following:\n\n```python\nfrom __future__ import print_function\n\nimport time\nimport trilium_client\nfrom trilium_client.rest import ApiException\nfrom pprint import pprint\n\n# Defining the host is optional and defaults to http://localhost:37740/etapi\n# See configuration.py for a list of all supported configuration parameters.\nconfiguration = trilium_client.Configuration(\n    host = \"http://localhost:37740/etapi\"\n)\n\n# The client must configure the authentication and authorization parameters\n# in accordance with the API server security policy.\n# Examples for each auth method are provided below, use the example that\n# satisfies your auth use case.\n\n# Configure API key authorization: EtapiTokenAuth\nconfiguration.api_key['EtapiTokenAuth'] = os.environ[\"API_KEY\"]\n\n# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed\n# configuration.api_key_prefix['EtapiTokenAuth'] = 'Bearer'\n\n# Configure HTTP basic authorization: EtapiBasicAuth\nconfiguration = trilium_client.Configuration(\n    username = os.environ[\"USERNAME\"],\n    password = os.environ[\"PASSWORD\"]\n)\n\n\n# Enter a context with an instance of the API client\nwith trilium_client.ApiClient(configuration) as api_client:\n    # Create an instance of the API class\n    api_instance = trilium_client.DefaultApi(api_client)\n    backup_name = 'backup_name_example' # str | If the backupName is e.g. \\\"now\\\", then the backup will be written to \\\"backup-now.db\\\" file\n\n    try:\n        api_instance.create_backup(backup_name)\n    except ApiException as e:\n        print(\"Exception when calling DefaultApi->create_backup: %s\\n\" % e)\n\n```\n\n## Documentation for API Endpoints\n\nAll URIs are relative to *http://localhost:37740/etapi*\n\nClass | Method | HTTP request | Description\n------------ | ------------- | ------------- | -------------\n*DefaultApi* | [**create_backup**](docs/DefaultApi.md#create_backup) | **PUT** /backup/{backupName} | \n*DefaultApi* | [**create_note**](docs/DefaultApi.md#create_note) | **POST** /create-note | \n*DefaultApi* | [**create_revision**](docs/DefaultApi.md#create_revision) | **POST** /notes/{noteId}/revision | \n*DefaultApi* | [**delete_attribute_by_id**](docs/DefaultApi.md#delete_attribute_by_id) | **DELETE** /attributes/{attributeId} | \n*DefaultApi* | [**delete_branch_by_id**](docs/DefaultApi.md#delete_branch_by_id) | **DELETE** /branches/{branchId} | \n*DefaultApi* | [**delete_note_by_id**](docs/DefaultApi.md#delete_note_by_id) | **DELETE** /notes/{noteId} | \n*DefaultApi* | [**export_note_subtree**](docs/DefaultApi.md#export_note_subtree) | **GET** /notes/{noteId}/export | \n*DefaultApi* | [**get_app_info**](docs/DefaultApi.md#get_app_info) | **GET** /app-info | \n*DefaultApi* | [**get_attribute_by_id**](docs/DefaultApi.md#get_attribute_by_id) | **GET** /attributes/{attributeId} | \n*DefaultApi* | [**get_branch_by_id**](docs/DefaultApi.md#get_branch_by_id) | **GET** /branches/{branchId} | \n*DefaultApi* | [**get_day_note**](docs/DefaultApi.md#get_day_note) | **GET** /calendar/days/{date} | \n*DefaultApi* | [**get_inbox_note**](docs/DefaultApi.md#get_inbox_note) | **GET** /inbox/{date} | \n*DefaultApi* | [**get_month_note**](docs/DefaultApi.md#get_month_note) | **GET** /calendar/months/{month} | \n*DefaultApi* | [**get_note_by_id**](docs/DefaultApi.md#get_note_by_id) | **GET** /notes/{noteId} | \n*DefaultApi* | [**get_note_content**](docs/DefaultApi.md#get_note_content) | **GET** /notes/{noteId}/content | \n*DefaultApi* | [**get_week_note**](docs/DefaultApi.md#get_week_note) | **GET** /calendar/weeks/{date} | \n*DefaultApi* | [**get_year_note**](docs/DefaultApi.md#get_year_note) | **GET** /calendar/years/{year} | \n*DefaultApi* | [**import_zip**](docs/DefaultApi.md#import_zip) | **POST** /notes/{noteId}/import | \n*DefaultApi* | [**login**](docs/DefaultApi.md#login) | **POST** /auth/login | \n*DefaultApi* | [**logout**](docs/DefaultApi.md#logout) | **POST** /auth/logout | \n*DefaultApi* | [**patch_attribute_by_id**](docs/DefaultApi.md#patch_attribute_by_id) | **PATCH** /attributes/{attributeId} | \n*DefaultApi* | [**patch_branch_by_id**](docs/DefaultApi.md#patch_branch_by_id) | **PATCH** /branches/{branchId} | \n*DefaultApi* | [**patch_note_by_id**](docs/DefaultApi.md#patch_note_by_id) | **PATCH** /notes/{noteId} | \n*DefaultApi* | [**post_attribute**](docs/DefaultApi.md#post_attribute) | **POST** /attributes | \n*DefaultApi* | [**post_branch**](docs/DefaultApi.md#post_branch) | **POST** /branches | \n*DefaultApi* | [**post_refresh_note_ordering**](docs/DefaultApi.md#post_refresh_note_ordering) | **POST** /refresh-note-ordering/{parentNoteId} | \n*DefaultApi* | [**put_note_content_by_id**](docs/DefaultApi.md#put_note_content_by_id) | **PUT** /notes/{noteId}/content | \n*DefaultApi* | [**search_notes**](docs/DefaultApi.md#search_notes) | **GET** /notes | \n\n\n## Documentation For Models\n\n - [AppInfo](docs/AppInfo.md)\n - [Attribute](docs/Attribute.md)\n - [Branch](docs/Branch.md)\n - [CreateNoteDef](docs/CreateNoteDef.md)\n - [Error](docs/Error.md)\n - [Login201Response](docs/Login201Response.md)\n - [LoginRequest](docs/LoginRequest.md)\n - [Note](docs/Note.md)\n - [NoteWithBranch](docs/NoteWithBranch.md)\n - [SearchResponse](docs/SearchResponse.md)\n\n\n## Documentation For Authorization\n\n\n## EtapiTokenAuth\n\n- **Type**: API key\n- **API key parameter name**: Authorization\n- **Location**: HTTP header\n\n\n## EtapiBasicAuth\n\n- **Type**: HTTP basic authentication\n\n\n## Author\n\nzadam.apps@gmail.com\n\n\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Trilium ETAPI client generated by OpenAPI Generator",
    "version": "0.1.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "03155bd16adadebfb84bfbbb1d5a83ee7668d25730babc0c81c51e54b59e0c85",
                "md5": "6b9bb84b572914ea24753e7305e1cdf9",
                "sha256": "2899843f83c2a67f7ba2405e8cf1f248390803ec51a85da179ac3c2c23bea397"
            },
            "downloads": -1,
            "filename": "trilium_client-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6b9bb84b572914ea24753e7305e1cdf9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 45517,
            "upload_time": "2023-08-05T23:23:57",
            "upload_time_iso_8601": "2023-08-05T23:23:57.805161Z",
            "url": "https://files.pythonhosted.org/packages/03/15/5bd16adadebfb84bfbbb1d5a83ee7668d25730babc0c81c51e54b59e0c85/trilium_client-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1cd9d7d19b830b4b0bd6836bd954bbfde66e9d49ddb886078d077bc6c67b166e",
                "md5": "ab90271946bbaf4abf37873b5e6bf424",
                "sha256": "689764a1444fb7a9bd92e150fa44f18cb57508fdb212ff99012f8fea6e8a56d4"
            },
            "downloads": -1,
            "filename": "trilium_client-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ab90271946bbaf4abf37873b5e6bf424",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 34216,
            "upload_time": "2023-08-05T23:23:59",
            "upload_time_iso_8601": "2023-08-05T23:23:59.686346Z",
            "url": "https://files.pythonhosted.org/packages/1c/d9/d7d19b830b4b0bd6836bd954bbfde66e9d49ddb886078d077bc6c67b166e/trilium_client-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-05 23:23:59",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "trilium-client"
}
        
Elapsed time: 0.12503s