gnomock-python-sdk
gnomock is an HTTP wrapper for Gnomock integration and end-to-end testing toolkit. It allows to use Gnomock outside of Go ecosystem. Not all Gnomock features exist in this wrapper, but official presets, as well as basic general configuration, are supported.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.4.5
- Package version: 1.4.5
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://github.com/orlangure/gnomock/
Requirements.
Python 2.7 and 3.4+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/orlangure/gnomock-python-sdk.git(you may need to run pip with root permission: sudo pip install git+https://github.com/orlangure/gnomock-python-sdk.git)
Then import the package:
import gnomockSetuptools
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 gnomockGetting Started
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import gnomock
from gnomock.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://127.0.0.1:23042
# See configuration.py for a list of all supported configuration parameters.
configuration = gnomock.Configuration(
host = "http://127.0.0.1:23042"
)
# Enter a context with an instance of the API client
with gnomock.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = gnomock.PresetsApi(api_client)
elastic_request = gnomock.ElasticRequest() # ElasticRequest |
try:
# Start a new Gnomock Elasticsearch container
api_response = api_instance.start_elastic(elastic_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling PresetsApi->start_elastic: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to http://127.0.0.1:23042
| Class | Method | HTTP request | Description |
|---|---|---|---|
| PresetsApi | start_elastic | POST /start/elastic | Start a new Gnomock Elasticsearch container |
| PresetsApi | start_kafka | POST /start/kafka | Start a new Gnomock Kafka container |
| PresetsApi | start_localstack | POST /start/localstack | Start a new Gnomock Localstack container |
| PresetsApi | start_mariadb | POST /start/mariadb | Start a new Gnomock MariaDB container |
| PresetsApi | start_memcached | POST /start/memcached | Start a new Gnomock Memcached container |
| PresetsApi | start_mongo | POST /start/mongo | Start a new Gnomock MongoDB container |
| PresetsApi | start_mssql | POST /start/mssql | Start a new Gnomock Microsoft SQL Server container |
| PresetsApi | start_mysql | POST /start/mysql | Start a new Gnomock MySQL container |
| PresetsApi | start_postgres | POST /start/postgres | Start a new Gnomock Postgres container |
| PresetsApi | start_rabbit_mq | POST /start/rabbitmq | Start a new Gnomock RabbitMQ container |
| PresetsApi | start_redis | POST /start/redis | Start a new Gnomock Redis container |
| PresetsApi | start_splunk | POST /start/splunk | Start a new Gnomock Splunk container |
| PresetsApi | stop | POST /stop | Stop an existing Gnomock container |
Documentation For Models
- Container
- Elastic
- ElasticRequest
- InvalidStartRequest
- InvalidStopRequest
- Kafka
- KafkaMessages
- KafkaRequest
- Localstack
- LocalstackRequest
- Mariadb
- MariadbRequest
- Memcached
- MemcachedRequest
- Mongo
- MongoRequest
- Mssql
- MssqlRequest
- Mysql
- MysqlRequest
- Options
- Postgres
- PostgresRequest
- Rabbitmq
- RabbitmqRequest
- Redis
- RedisRequest
- Splunk
- SplunkRequest
- SplunkValues
- StartFailed
- StopFailed
- StopRequest
Documentation For Authorization
All endpoints do not require authorization.