Skip to content

A Python SDK for NGSI v2. It allows to quickly develop applications interacting with NGSI v2 API.

License

Notifications You must be signed in to change notification settings

smartsdk/ngsi-sdk-python

Repository files navigation

swagger_client

NGSI V2 API

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

  • API version: v2
  • Package version: 1.0.0
  • Build package: class io.swagger.codegen.languages.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

(you may need to run pip with root permission: sudo pip install git+https://github.com//.git)

Then import the package:

import swagger_client 

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 swagger_client

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: fiware_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.APIEntryPointApi()

try:
    api_response = api_instance.retrieve_api_resources()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling APIEntryPointApi->retrieve_api_resources: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://orion.lab.fiware.org:1026/v2

Class Method HTTP request Description
APIEntryPointApi retrieve_api_resources GET /
AttributeValueApi get_attribute_value GET /entities/{entityId}/attrs/{attrName}/value
AttributeValueApi update_attribute_value PUT /entities/{entityId}/attrs/{attrName}/value
AttributesApi get_attribute_data GET /entities/{entityId}/attrs/{attrName}
AttributesApi remove_a_single_attribute DELETE /entities/{entityId}/attrs/{attrName}
AttributesApi update_attribute_data PUT /entities/{entityId}/attrs/{attrName}
BatchOperationsApi query POST /op/query
BatchOperationsApi update POST /op/update
EntitiesApi create_entity POST /entities
EntitiesApi list_entities GET /entities
EntitiesApi remove_entity DELETE /entities/{entityId}
EntitiesApi replace_all_entity_attributes PUT /entities/{entityId}/attrs
EntitiesApi retrieve_entity GET /entities/{entityId}
EntitiesApi retrieve_entity_attributes GET /entities/{entityId}/attrs
EntitiesApi update_existing_entity_attributes PATCH /entities/{entityId}/attrs
EntitiesApi update_or_append_entity_attributes POST /entities/{entityId}/attrs
SubscriptionsApi create_a_new_subscription POST /subscriptions
SubscriptionsApi delete_subscription DELETE /subscriptions/{subscriptionId}
SubscriptionsApi retrieve_subscription GET /subscriptions/{subscriptionId}
SubscriptionsApi retrieve_subscriptions GET /subscriptions
SubscriptionsApi update_subscription PATCH /subscriptions/{subscriptionId}
TypesApi retrieve_entity_type GET /types/{entityType}
TypesApi retrieve_entity_types GET /types/

Documentation For Models

Documentation For Authorization

fiware_token

  • Type: API key
  • API key parameter name: X-Auth-Token
  • Location: HTTP header

Author

About

A Python SDK for NGSI v2. It allows to quickly develop applications interacting with NGSI v2 API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published