Skip to main content

Deep Lynx Python SDK

Project description

Deep Lynx Python SDK

This is an SDK for the Deep Lynx data warehouse that supports Python projects. It is used for creating API requests and sending and receiving data from Deep Lynx.

This is an autogenerated file
Please see the official README for information on contributing, testing, installing, uploading to PyPi, as well as correctly formatted examples.

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 1.0
  • Package version: 0.1.6
  • Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

Contributing

When running the swagger-codgen command to generate this code base, please supply the following language-specific options:
--additional-properties packageName=deep_lynx projectName=deep_lynx

Testing

Please provide the Deep Lynx API key and secret when performing testing. To do so, copy the .env-sample file and rename to .env and supply the needed values. Basic testing is currently performed within test/test_create_manual_import.py.

Requirements.

Python 2.7 or 3.4+

Installation & Usage

pip/poetry install

pip: pip install deep_lynx
poetry: poetry add deep_lynx

GitHub

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 deep_lynx 

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 deep_lynx

Uploading this Distribution to PyPi

Follow these steps for uploading the latest distribution to PyPI (requires maintainer access to the deep_lynx package). See the official docs for more information.

  • Ensure both the build and twine packages have been installed
  • Update setup.py and this README as necessary to update the VERSION and whatever other metadata adjustments are necessary
  • Run python -m build to generate the dist/ directory with the source archive and built distribution files
  • Upload the archives to PyPI by running python -m twine upload dist/* and providing your PyPI user credentials

Getting Started

Please follow the installation procedure and then run something like the following example (Python 3):

import deep_lynx
from deep_lynx.rest import ApiException
from pprint import pprint

# initialize an ApiClient for use with deep_lynx APIs
configuration = deep_lynx.configuration.Configuration()
configuration.host = 'http://localhost:8090'
apiClient = deep_lynx.ApiClient(configuration)

# authenticate via an API key and secret
authApi = deep_lynx.AuthenticationApi(apiClient)
apiKey = 'myKey'
apiSecret = 'mySecret'

token = authApi.retrieve_o_auth_token(x_api_key=apiKey, x_api_secret=apiSecret, x_api_expiry='1h')

# create a container
containerApi = deep_lynx.ContainersApi(apiClient)
container = containerApi.create_container(CreateContainerRequest(
    'myContainer', 'Container description', False
))
containerId = container.value[0].id

# create a data source
datasourcesApi = deep_lynx.DataSourcesApi(apiClient)

datasource = datasourcesApi.create_data_source(CreateDataSourceRequest(
    'sdk_test_source', 'standard', True
), containerId)
datasourceId = datasource.value.id

# create manual import
importResult = datasourcesApi.create_manual_import(
    {'test': 'test import'},
    containerId,
    datasourceId
)

Documentation for API Endpoints

All URIs are relative to http://localhost:8090 (or whatever your host and port is)

Class Method HTTP request Description
AuthenticationApi exchange_o_auth_token POST /oauth/exchange Exchange OAuth Token
AuthenticationApi retrieve_o_auth_token GET /oauth/token Retrieve OAuth Token
AuthenticationApi rsa_cancel POST /rsa/cancel RSA Cancel
AuthenticationApi rsa_initialize POST /rsa/initialize RSA Initialize
AuthenticationApi rsa_status POST /rsa/status RSA Status
AuthenticationApi rsa_verify POST /rsa/verify RSA Verify
ContainersApi acknowledge_container_alert POST /containers/{container_id}/alerts/{alert_id} Acknowledge Container Alert
ContainersApi approve_ontology_version PUT /containers/{container_id}/ontology/versions/{ontology_version_id}/approve Approve Ontology Version
ContainersApi archive_container DELETE /containers/{container_id} Archive Container
ContainersApi container_batch_update PUT /containers Container Batch Update
ContainersApi create_container POST /containers Create Container
ContainersApi import_container POST /containers/import Import Container
ContainersApi list_container_alerts GET /containers/{container_id}/alerts List Container Alerts
ContainersApi list_containers GET /containers List Containers
ContainersApi list_ontology_versions GET /containers/{container_id}/ontology/versions List Ontology Versions
ContainersApi publish_ontology_version POST /containers/{container_id}/ontology/versions/{ontology_version_id}/publish Publish Ontology Version
ContainersApi reject_ontology_version_approval DELETE /containers/{container_id}/ontology/versions/{ontology_version_id}/approve Reject Ontology Version Approval
ContainersApi repair_container_permissions POST /containers/{container_id}/permissions Repair Container Permissions
ContainersApi retrieve_container GET /containers/{container_id} Retrieve Container
ContainersApi retrieve_ontology_version GET /containers/{container_id}/ontology/versions/{version_id} Retrieve Ontology Version
ContainersApi rollback_ontology_version POST /containers/{container_id}/ontology/versions/{version_id}/rollback Rollback Ontology Version
ContainersApi send_ontology_version_for_approval POST /containers/{container_id}/ontology/versions/{ontology_version_id}/approve Send Ontology Version for Approval
ContainersApi set_container_active POST /containers/{container_id}/active Set Container Active
ContainersApi update_container PUT /containers/{container_id} Update Container
ContainersApi update_container_import PUT /containers/import/{container_id} Update Container Import
DataExportApi create_data_export POST /containers/{container_id}/data/export Create Data Export
DataExportApi delete_data_export DELETE /containers/{container_id}/data/export/{export_id} Delete Data Export
DataExportApi list_data_exports GET /containers/{container_id}/data/export List Data Exports
DataExportApi retrieve_data_export GET /containers/{container_id}/data/export/{export_id} Retrieve Data Export
DataExportApi start_data_export POST /containers/{container_id}/data/export/{export_id} Start Data Export
DataExportApi stop_data_export PUT /containers/{container_id}/data/export/{export_id} Stop Data Export
DataQueryApi query_graph POST /containers/{container_id}/query Query Graph
DataSourcesApi archive_data_source DELETE /containers/{container_id}/import/datasources/{data_source_id} Archive Data Source
DataSourcesApi create_data_source POST /containers/{container_id}/import/datasources Create Data Source
DataSourcesApi create_manual_import POST /containers/{container_id}/import/datasources/{data_source_id}/imports Create Manual Import
DataSourcesApi download_file GET /containers/{container_id}/files/{file_id}/download Download File
DataSourcesApi list_data_sources GET /containers/{container_id}/import/datasources List Data Sources
DataSourcesApi list_imports_for_data_source GET /containers/{container_id}/import/datasources/{data_source_id}/imports List Imports for Data Source
DataSourcesApi retrieve_data_source GET /containers/{container_id}/import/datasources/{data_source_id} Retrieve Data Source
DataSourcesApi retrieve_file GET /containers/{container_id}/files/{file_id} Retrieve File
DataSourcesApi set_data_source_active POST /containers/{container_id}/import/datasources/{data_source_id}/active Set Data Source Active
DataSourcesApi set_data_source_configuration PUT /containers/{container_id}/import/datasources/{data_source_id} Set Data Source Configuration
DataSourcesApi set_data_source_inactive DELETE /containers/{container_id}/import/datasources/{data_source_id}/active Set Data Source Inactive
DataSourcesApi upload_file POST /containers/{container_id}/import/datasources/{data_source_id}/files Upload File
DataTypeMappingsApi create_transformation POST /containers/{container_id}/import/datasources/{data_source_id}/mappings/{mapping_id}/transformations Create Data Type Mapping's Transformations
DataTypeMappingsApi delete_data_type_mapping DELETE /containers/{container_id}/import/datasources/{data_source_id}/mappings/{mapping_id} Delete Data Type Mapping
DataTypeMappingsApi delete_transformation DELETE /containers/{container_id}/import/datasources/{data_source_id}/mappings/{mapping_id}/transformations/{transformation_id} Delete Data Type Mapping's Transformations
DataTypeMappingsApi export_type_mappings POST /containers/{container_id}/import/datasources/{data_source_id}/mappings/export Export Type Mappings
DataTypeMappingsApi import_data_type_mappings POST /containers/{container_id}/import/datasources/{data_source_id}/mappings/import Import Data Type Mappings
DataTypeMappingsApi list_data_type_mappings GET /containers/{container_id}/import/datasources/{data_source_id}/mappings List Data Type Mappings
DataTypeMappingsApi list_transformations GET /containers/{container_id}/import/datasources/{data_source_id}/mappings/{mapping_id}/transformations List Data Type Mapping's Transformations
DataTypeMappingsApi retrieve_data_type_mapping GET /containers/{container_id}/import/datasources/{data_source_id}/mappings/{mapping_id} Retrieve Data Type Mapping
DataTypeMappingsApi update_data_type_mapping PUT /containers/{container_id}/import/datasources/{data_source_id}/mappings/{mapping_id} Update Data Type Mapping
DataTypeMappingsApi update_transformation PUT /containers/{container_id}/import/datasources/{data_source_id}/mappings/{mapping_id}/transformations/{transformation_id} Update Data Type Mapping's Transformations
EventsApi create_event POST /events Create Event
EventsApi create_event_action POST /event_actions Create Event Action
EventsApi delete_event_action DELETE /event_actions/{action_id} Delete Event Action
EventsApi list_event_action_statuses GET /event_action_status List Event Action Statuses
EventsApi list_event_actions GET /event_actions List Event Actions
EventsApi retrieve_event_action GET /event_actions/{action_id} Retrieve Event Action
EventsApi retrieve_event_action_status GET /event_action_status/{status_id} Retrieve Event Action Status
EventsApi update_event_action PUT /event_actions/{action_id} Update Event Action
EventsApi update_event_action_status PUT /event_action_status/{status_id} Update Event Action Status
GraphApi archive_edge DELETE /containers/{container_id}/graphs/edges/{edge_id} Archive Edge
GraphApi archive_node DELETE /containers/{container_id}/graphs/nodes/{node_id} Archive Node
GraphApi attach_edge_file PUT /containers/{container_id}/graphs/edges/{edge_id}/files/{file_id} Attach Edge File
GraphApi attach_node_file PUT /containers/{container_id}/graphs/nodes/{node_id}/files/{file_id} Attach Node File
GraphApi create_or_update_edges POST /containers/{container_id}/graphs/edges Create or Update Edges
GraphApi create_or_update_nodes POST /containers/{container_id}/graphs/nodes Create Or Update Nodes
GraphApi delete_node_file DELETE /containers/{container_id}/graphs/nodes/{node_id}/files/{file_id} Detach Node File
GraphApi detach_node_file DELETE /containers/{container_id}/graphs/edges/{edge_id}/files/{file_id} Detach Node File
GraphApi list_edge_files GET /containers/{container_id}/graphs/edges/{edge_id}/files List Edge Files
GraphApi list_edges GET /containers/{container_id}/graphs/edges List Edges
GraphApi list_node_files GET /containers/{container_id}/graphs/nodes/{node_id}/files List Node Files
GraphApi list_nodes GET /containers/{container_id}/graphs/nodes List Nodes
GraphApi list_nodes_by_metatype_id GET /containers/{container_id}/graphs/nodes/metatype/{metatype_id} List Nodes By Metatype ID
GraphApi retrieve_edge GET /containers/{container_id}/graphs/edges/{edge_id} Retrieve Edge
GraphApi retrieve_node GET /containers/{container_id}/graphs/nodes/{node_id} Retrieve Node
ImportsApi add_data_to_import POST /containers/{container_id}/datasources/{data_source_id}/imports/{import_id}/data Add Data to Import
ImportsApi create_import POST /containers/{container_id}/datasources/{data_source_id}/imports Create Import
ImportsApi delete_import DELETE /containers/{container_id}/import/imports/{import_id} Delete Import
ImportsApi delete_import_data DELETE /containers/{container_id}/import/imports/{import_id}/data/{data_id} Delete Import Data
ImportsApi list_imports_data GET /containers/{container_id}/import/imports/{import_id}/data List Import's Data
ImportsApi retrieve_import_data GET /containers/{container_id}/import/imports/{import_id}/data/{data_id} Retrieve Import Data
ImportsApi update_import_data PUT /containers/{container_id}/import/imports/{import_id}/data/{data_id} Update Import Data
MetatypeKeysApi archive_metatype_key DELETE /containers/{container_id}/metatypes/{metatype_id}/keys/{key_id} Archive Metatype Key
MetatypeKeysApi create_metatype_key POST /containers/{container_id}/metatypes/{metatype_id}/keys Create Metatype Key
MetatypeKeysApi list_metatypes_keys GET /containers/{container_id}/metatypes/{metatype_id}/keys List Metatype's Keys
MetatypeKeysApi retrieve_metatype_key GET /containers/{container_id}/metatypes/{metatype_id}/keys/{key_id} Retrieve Metatype Key
MetatypeKeysApi update_metatype_key PUT /containers/{container_id}/metatypes/{metatype_id}/keys/{key_id} Update Metatype Key
MetatypeRelationshipKeysApi archive_metatype_relationship_key DELETE /containers/{container_id}/metatype_relationships/{relationship_id}/keys/{key_id} Archive Metatype Relationship Key
MetatypeRelationshipKeysApi create_metatype_relationship_key POST /containers/{container_id}/metatype_relationships/{relationship_id}/keys Create Metatype Relationship Key
MetatypeRelationshipKeysApi list_metatype_relationship_keys GET /containers/{container_id}/metatype_relationships/{relationship_id}/keys List Metatype Relationship Keys
MetatypeRelationshipKeysApi retrieve_metatype_relationship_key GET /containers/{container_id}/metatype_relationships/{relationship_id}/keys/{key_id} Retrieve Metatype Relationship Key
MetatypeRelationshipKeysApi update_metatype_relationship_key PUT /containers/{container_id}/metatype_relationships/{relationship_id}/keys/{key_id} Update Metaype Relationship Key
MetatypeRelationshipPairsApi archive_metatype_relationship_pair DELETE /containers/{container_id}/metatype_relationship_pairs/{pair_id} Archive Metatype Relationship Pair
MetatypeRelationshipPairsApi create_metatype_relationship_pair POST /containers/{container_id}/metatype_relationship_pairs Create Metatype Relationship Pair
MetatypeRelationshipPairsApi list_metatype_relationship_pairs GET /containers/{container_id}/metatype_relationship_pairs List Metatype Relationship Pairs
MetatypeRelationshipPairsApi retrieve_metatype_relationship_pair GET /containers/{container_id}/metatype_relationship_pairs/{pair_id} Retrieve Metatype Relationship Pair
MetatypeRelationshipPairsApi update_metatype_relationship_pair PUT /containers/{container_id}/metatype_relationship_pairs/{pair_id} Update Metaype Relationship Pair
MetatypeRelationshipsApi archive_metatype_relationship DELETE /containers/{container_id}/metatype_relationships/{relationship_id} Archive Metatype Relationship
MetatypeRelationshipsApi create_metatype_relationship POST /containers/{container_id}/metatype_relationships Create Metatype Relationship
MetatypeRelationshipsApi list_metatype_relationships GET /containers/{container_id}/metatype_relationships List Metatype Relationships
MetatypeRelationshipsApi retrieve_metatype_relationship GET /containers/{container_id}/metatype_relationships/{relationship_id} Retrieve Metatype Relationship
MetatypeRelationshipsApi update_metatype_relationship PUT /containers/{container_id}/metatype_relationships/{relationship_id} Update Metatype Relationship
MetatypesApi archive_metatype DELETE /containers/{container_id}/metatypes/{metatype_id} Archive Metatype
MetatypesApi create_metatype POST /containers/{container_id}/metatypes Create Metatype
MetatypesApi list_metatypes GET /containers/{container_id}/metatypes List Metatypes
MetatypesApi retrieve_metaype GET /containers/{container_id}/metatypes/{metatype_id} Retrieve Metatype
MetatypesApi update_metatype PUT /containers/{container_id}/metatypes/{metatype_id} Update Metatype
MetatypesApi validate_metatype_properties POST /containers/{container_id}/metatypes/{metatype_id} Validate Metatype Properties
MiscApi health GET /health Health
UsersApi accept_container_invite GET /users/invite AcceptContainerInvite
UsersApi assign_user_role POST /containers/{container_id}/users/roles AssignUserRole
UsersApi delete_user DELETE /users/{user_id} DeleteUser
UsersApi invite_user_to_container POST /containers/{container_id}/users/invite InviteUserToContainer
UsersApi list_invited_users_for_container GET /containers/{container_id}/users/invite ListInvitedUsersForContainer
UsersApi list_outstanding_invites GET /users/invites ListOutstandingInvites
UsersApi list_user_permissions GET /users/permissions ListUserPermissions
UsersApi list_users GET /users ListUsers
UsersApi list_users_for_container GET /containers/{container_id}/users ListUsersForContainer
UsersApi list_users_roles GET /containers/{container_id}/users/{user_id}/roles ListUsersRoles
UsersApi retrieve_user GET /containers/{container_id}/users/{user_id} RetrieveUser
UsersApi update_user PUT /users/{user_id} UpdateUser

Documentation For Models

Other Software

Idaho National Laboratory is a cutting edge research facility which is a constantly producing high quality research and software. Feel free to take a look at our other software and scientific offerings at:

Primary Technology Offerings Page

Supported Open Source Software

Raw Experiment Open Source Software

Unsupported Open Source Software

License

Copyright 2021 Battelle Energy Alliance, LLC

Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://opensource.org/licenses/MIT

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensing

This software is licensed under the terms you may find in the file named "LICENSE" in this directory.

Developers

By contributing to this software project, you are agreeing to the following terms and conditions for your contributions:

You agree your contributions are submitted under the MIT license. You represent you are authorized to make the contributions and grant the license. If your employer has rights to intellectual property that includes your contributions, you represent that you have received permission to make contributions and grant the required license on behalf of that employer.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deep_lynx-0.1.6.tar.gz (272.0 kB view hashes)

Uploaded Source

Built Distribution

deep_lynx-0.1.6-py3-none-any.whl (1.2 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page