Package: trilium-client
This is an auto-generated client forTrilium. It builds an API client using theetapi.openapi.yamlprovided by Trilium.It's a simple Poetry project with a build script to invoke theOpenAPI Generatorand extract dependencies. The generatedtrilium_client,docs, andREADME.mdartifacts are packaged and many unused files are ignored.To build this project, activate a shell: (recommended)poetryshellAnd run:poetryinstall--with=dev
sconsTo clean, run:scons--cleanFollowing is the README produced by the generator.trilium-clientExternal Trilium APIThis Python package is automatically generated by theOpenAPI Generatorproject:API version: 1.0.0Package version: 1.0.0Build package: org.openapitools.codegen.languages.PythonNextgenClientCodegen
For more information, please visithttps://github.com/zadam/triliumRequirements.Python 3.7+Installation & Usagepip installIf the python package is hosted on a repository, you can install directly using:pipinstallgit+https://github.com/GIT_USER_ID/GIT_REPO_ID.git(you may need to runpipwith root permission:sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)Then import the package:importtrilium_clientSetuptoolsInstall viaSetuptools.pythonsetup.pyinstall--user(orsudo python setup.py installto install the package for all users)Then import the package:importtrilium_clientGetting StartedPlease follow theinstallation procedureand then run the following:from__future__importprint_functionimporttimeimporttrilium_clientfromtrilium_client.restimportApiExceptionfrompprintimportpprint# 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: EtapiTokenAuthconfiguration.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: EtapiBasicAuthconfiguration=trilium_client.Configuration(username=os.environ["USERNAME"],password=os.environ["PASSWORD"])# Enter a context with an instance of the API clientwithtrilium_client.ApiClient(configuration)asapi_client:# Create an instance of the API classapi_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\" filetry:api_instance.create_backup(backup_name)exceptApiExceptionase:print("Exception when calling DefaultApi->create_backup:%s\n"%e)Documentation for API EndpointsAll URIs are relative tohttp://localhost:37740/etapiClassMethodHTTP requestDescriptionDefaultApicreate_backupPUT/backup/{backupName}DefaultApicreate_notePOST/create-noteDefaultApicreate_revisionPOST/notes/{noteId}/revisionDefaultApidelete_attribute_by_idDELETE/attributes/{attributeId}DefaultApidelete_branch_by_idDELETE/branches/{branchId}DefaultApidelete_note_by_idDELETE/notes/{noteId}DefaultApiexport_note_subtreeGET/notes/{noteId}/exportDefaultApiget_app_infoGET/app-infoDefaultApiget_attribute_by_idGET/attributes/{attributeId}DefaultApiget_branch_by_idGET/branches/{branchId}DefaultApiget_day_noteGET/calendar/days/{date}DefaultApiget_inbox_noteGET/inbox/{date}DefaultApiget_month_noteGET/calendar/months/{month}DefaultApiget_note_by_idGET/notes/{noteId}DefaultApiget_note_contentGET/notes/{noteId}/contentDefaultApiget_week_noteGET/calendar/weeks/{date}DefaultApiget_year_noteGET/calendar/years/{year}DefaultApiimport_zipPOST/notes/{noteId}/importDefaultApiloginPOST/auth/loginDefaultApilogoutPOST/auth/logoutDefaultApipatch_attribute_by_idPATCH/attributes/{attributeId}DefaultApipatch_branch_by_idPATCH/branches/{branchId}DefaultApipatch_note_by_idPATCH/notes/{noteId}DefaultApipost_attributePOST/attributesDefaultApipost_branchPOST/branchesDefaultApipost_refresh_note_orderingPOST/refresh-note-ordering/{parentNoteId}DefaultApiput_note_content_by_idPUT/notes/{noteId}/contentDefaultApisearch_notesGET/notesDocumentation For ModelsAppInfoAttributeBranchCreateNoteDefErrorLogin201ResponseLoginRequestNoteNoteWithBranchSearchResponseDocumentation For AuthorizationEtapiTokenAuthType: API keyAPI key parameter name: AuthorizationLocation: HTTP headerEtapiBasicAuthType: HTTP basic authenticationAuthorzadam.apps@gmail.com