Skip to content

clv/vectorizer-ai-python

Repository files navigation

vectorizer-ai-sdk

OpenAPI 3.0 specification for the Vectorizer.AI image vectorization API. Authenticate with HTTP Basic auth, using your API Id as the username and your API Secret as the password.

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

  • API version: 1.0.0
  • Package version: 1.0.0
  • Generator version: 7.6.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://vectorizer.ai/support

Requirements.

Python 3.7+

Installation & Usage

pip install

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

pip install git+https://github.com/clv/vectorizer-ai-python.git

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

Then import the package:

import vectorizer_ai

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 vectorizer_ai

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import vectorizer_ai
from vectorizer_ai.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.vectorizer.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = vectorizer_ai.Configuration(
    host = "https://api.vectorizer.ai/api/v1"
)

# 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 HTTP basic authorization: basicAuth
configuration = vectorizer_ai.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)


# Enter a context with an instance of the API client
with vectorizer_ai.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = vectorizer_ai.AccountApi(api_client)

    try:
        # Get account status
        api_response = api_instance.get_account_status()
        print("The response of AccountApi->get_account_status:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AccountApi->get_account_status: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.vectorizer.ai/api/v1

Class Method HTTP request Description
AccountApi get_account_status GET /account Get account status
VectorizationApi post_delete POST /delete Delete a retained image
VectorizationApi post_download POST /download Download a retained result
VectorizationApi post_vectorize POST /vectorize Vectorize an image

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication

Author

support@vectorizer.ai

About

Official Python SDK for the Vectorizer.AI image vectorization API.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages