Skip to main content

A Python client for the Stairwell platform.

Project description

stairwell-api

Restful APIs for the Stairwell platform. Most APIs expose named resources: each resource has a unique identifier that users use to reference that resource, and these names are what users should store as the canonical names for the resources. The base URL for this API is https://app.stairwell.com

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen

Requirements.

Python 3.8+

Installation & Usage

pip install

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

pip install git+https://github.com/stairwell-inc/stairwell-python.git

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

Then import the package:

import stairwell_openapi_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 stairwell_openapi_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import time
import stairwell_openapi_client
from stairwell_openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.stairwell.com
# See configuration.py for a list of all supported configuration parameters.
configuration = stairwell_openapi_client.Configuration(
    host = "https://app.stairwell.com"
)

# 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: AuthToken
configuration.api_key['AuthToken'] = os.environ["API_KEY"]

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


# Enter a context with an instance of the API client
async with stairwell_openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = stairwell_openapi_client.AssetsApi(api_client)
    asset = 'asset_example' # str | The asset id.
    tag = stairwell_openapi_client.Tag() # Tag | 

    try:
        # CreateTag
        api_response = await api_instance.assets_create_tag(asset, tag)
        print("The response of AssetsApi->assets_create_tag:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AssetsApi->assets_create_tag: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://app.stairwell.com

Class Method HTTP request Description
AssetsApi assets_create_tag POST /v1/assets/{asset}/tags CreateTag
AssetsApi assets_delete_tag DELETE /v1/assets/{asset}/tags/{tag} DeleteTag
AssetsApi assets_get_asset GET /v1/assets/{asset} GetAsset
AssetsApi assets_get_tag GET /v1/assets/{asset}/tags/{tag} GetTag
AssetsApi assets_list_assets GET /v1/environments/{environment}/assets ListAssets
AssetsApi assets_list_tags GET /v1/assets/{asset}/tags ListTags
HostnamesApi hostnames_create_comment POST /v1/hostnames/{hostname}/comments CreateComment
HostnamesApi hostnames_create_opinion POST /v1/hostnames/{hostname}/opinions CreateOpinion
HostnamesApi hostnames_create_tag POST /v1/hostnames/{hostname}/tags CreateTag
HostnamesApi hostnames_delete_tag DELETE /v1/hostnames/{hostname}/tags/{tag} DeleteTag
HostnamesApi hostnames_get_hostname_metadata GET /v1/hostnames/{hostname}/metadata GetHostnameMetadata
HostnamesApi hostnames_get_tag GET /v1/hostnames/{hostname}/tags/{tag} GetTag
HostnamesApi hostnames_list_comments GET /v1/hostnames/{hostname}/comments ListComments
HostnamesApi hostnames_list_opinions GET /v1/hostnames/{hostname}/opinions ListOpinions
HostnamesApi hostnames_list_tags GET /v1/hostnames/{hostname}/tags ListTags
IpAddressesApi ip_addresses_create_comment POST /v1/ipAddresses/{ipAddress}/comments CreateComment
IpAddressesApi ip_addresses_create_opinion POST /v1/ipAddresses/{ipAddress}/opinions CreateOpinion
IpAddressesApi ip_addresses_create_tag POST /v1/ipAddresses/{ipAddress}/tags CreateTag
IpAddressesApi ip_addresses_delete_tag DELETE /v1/ipAddresses/{ipAddress}/tags/{tag} DeleteTag
IpAddressesApi ip_addresses_get_ip_address_metadata GET /v1/ipAddresses/{ipAddress}/metadata GetIpAddressMetadata
IpAddressesApi ip_addresses_get_tag GET /v1/ipAddresses/{ipAddress}/tags/{tag} GetTag
IpAddressesApi ip_addresses_list_comments GET /v1/ipAddresses/{ipAddress}/comments ListComments
IpAddressesApi ip_addresses_list_opinions GET /v1/ipAddresses/{ipAddress}/opinions ListOpinions
IpAddressesApi ip_addresses_list_tags GET /v1/ipAddresses/{ipAddress}/tags ListTags
ObjectsApi objects_create_comment POST /v1/objects/{object}/comments CreateComment
ObjectsApi objects_create_opinion POST /v1/objects/{object}/opinions CreateOpinion
ObjectsApi objects_create_tag POST /v1/objects/{object}/tags CreateTag
ObjectsApi objects_delete_tag DELETE /v1/objects/{object}/tags/{tag} DeleteTag
ObjectsApi objects_download_object GET /v1/objects/{object}:download DownloadObject
ObjectsApi objects_get_object_detonation GET /v1/objects/{object}/detonation GetObjectDetonation
ObjectsApi objects_get_object_metadata GET /v1/objects/{object}/metadata GetObjectMetadata
ObjectsApi objects_get_tag GET /v1/objects/{object}/tags/{tag} GetTag
ObjectsApi objects_list_comments GET /v1/objects/{object}/comments ListComments
ObjectsApi objects_list_object_metadata GET /v1/objects/metadata ListObjectMetadata
ObjectsApi objects_list_object_sightings GET /v1/objects/{object}/sightings ListObjectSightings
ObjectsApi objects_list_object_variants GET /v1/objects/{object}/variants ListObjectVariants
ObjectsApi objects_list_opinions GET /v1/objects/{object}/opinions ListOpinions
ObjectsApi objects_list_tags GET /v1/objects/{object}/tags ListTags
ObjectsApi objects_trigger_object_detonation POST /v1/objects/{object}/detonation:trigger TriggerObjectDetonation
YaraRulesApi yara_rules_create_tag POST /v1/environments/{environment}/yaraRules/{yaraRule}/tags CreateTag
YaraRulesApi yara_rules_create_yara_rule POST /v1/environments/{environment}/yaraRules CreateYaraRule
YaraRulesApi yara_rules_delete_tag DELETE /v1/environments/{environment}/yaraRules/{yaraRule}/tags/{tag} DeleteTag
YaraRulesApi yara_rules_delete_yara_rule DELETE /v1/environments/{environment}/yaraRules/{yaraRule} DeleteYaraRule
YaraRulesApi yara_rules_get_tag GET /v1/environments/{environment}/yaraRules/{yaraRule}/tags/{tag} GetTag
YaraRulesApi yara_rules_get_yara_rule GET /v1/environments/{environment}/yaraRules/{yaraRule} GetYaraRule
YaraRulesApi yara_rules_list_tags GET /v1/environments/{environment}/yaraRules/{yaraRule}/tags ListTags
YaraRulesApi yara_rules_list_yara_rules GET /v1/environments/{environment}/yaraRules ListYaraRules
YaraRulesApi yara_rules_update_yara_rule PATCH /v1/environments/{environment}/yaraRules/{yaraRule} UpdateYaraRule

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

AuthToken

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

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

stairwell-0.0.4.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

stairwell-0.0.4-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file stairwell-0.0.4.tar.gz.

File metadata

  • Download URL: stairwell-0.0.4.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0

File hashes

Hashes for stairwell-0.0.4.tar.gz
Algorithm Hash digest
SHA256 3cd3ef1738cd678051e041dc81f4dee9a4a7257c6885afdbe6234b95cb1cc553
MD5 7f11e88e04338a739ef5f458a3a65cd1
BLAKE2b-256 77f2a2efe9ab2e15f1a3b10aa8303d0a05e0b96d0495f84f8eeecb900026bcae

See more details on using hashes here.

File details

Details for the file stairwell-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: stairwell-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0

File hashes

Hashes for stairwell-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 eb821c1e05fae3690976be08044192d33dfc6d63c59f29e1dcdb3224da7f73a2
MD5 e726769abbe5e2fc4740721d76c9faef
BLAKE2b-256 7e5870ac9449b00e20dac4b4a4449d578dc7479bd348c62b4f3143d491ca2379

See more details on using hashes here.

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