Skip to main content

Python Client SDK Generated by Speakeasy

Project description

Vessel API Python SDK

The Vessel API Python SDK is a PyPi library for accessing the Vessel API, a Unified CRM API that provides standardized endpoints for performing operations on common CRM Objects.

SDK Installation

pip install vesselapi

SDK Example Usage

Example

import vesselapi
from vesselapi.models import operations

s = vesselapi.VesselAPI()

req = operations.DeleteConnectionRequestBody(
    connection_id='string',
)

res = s.connections.delete(req, operations.DeleteConnectionSecurity(
    vessel_api_token="<YOUR_API_KEY_HERE>",
))

if res.status_code == 200:
    # handle response
    pass

Authentication

To authenticate the Vessel Node SDK you will need to provide a Vessel API Token, along with an Access Token for each request. For more details please see the Vessel API Documentation.

Available Resources and Operations

connections

  • delete - Delete Connection
  • find - Get Connection
  • list - Get All Connections

integrations

  • list - Get CRM Integrations

webhooks

accounts

calls

contacts

deals

emails

events

attendees

  • batch - Get Batch Event Attendees
  • create - Create Event Attendee
  • details - Get Event Attendee Details
  • find - Get Event Attendee
  • list - Get All Event Attendees
  • search - Search Event Attendees
  • update - Update Event Attendee

leads

notes

passthrough

  • create - Passthrough Request

tasks

users

links

  • create - Exchange Public Token for Access Token

tokens

Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.

Error Object Status Code Content Type
errors.SDKError 400-600 /

Example

import vesselapi
from vesselapi.models import operations

s = vesselapi.VesselAPI()

req = operations.DeleteConnectionRequestBody(
    connection_id='string',
)

res = None
try:
    res = s.connections.delete(req, operations.DeleteConnectionSecurity(
    vessel_api_token="<YOUR_API_KEY_HERE>",
))
except errors.SDKError as e:
    print(e)  # handle exception
    raise(e)

if res.status_code == 200:
    # handle response
    pass

Server Selection

Select Server by Index

You can override the default server globally by passing a server index to the server_idx: int optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:

# Server Variables
0 https://api.vessel.land None

Example

import vesselapi
from vesselapi.models import operations

s = vesselapi.VesselAPI(
    server_idx=0,
)

req = operations.DeleteConnectionRequestBody(
    connection_id='string',
)

res = s.connections.delete(req, operations.DeleteConnectionSecurity(
    vessel_api_token="<YOUR_API_KEY_HERE>",
))

if res.status_code == 200:
    # handle response
    pass

Override Server URL Per-Client

The default server can also be overridden globally by passing a URL to the server_url: str optional parameter when initializing the SDK client instance. For example:

import vesselapi
from vesselapi.models import operations

s = vesselapi.VesselAPI(
    server_url="https://api.vessel.land",
)

req = operations.DeleteConnectionRequestBody(
    connection_id='string',
)

res = s.connections.delete(req, operations.DeleteConnectionSecurity(
    vessel_api_token="<YOUR_API_KEY_HERE>",
))

if res.status_code == 200:
    # handle response
    pass

Custom HTTP Client

The Python SDK makes API calls using the (requests)[https://pypi.org/project/requests/] HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom requests.Session object.

For example, you could specify a header for every request that this sdk makes as follows:

import vesselapi
import requests

http_client = requests.Session()
http_client.headers.update({'x-custom-header': 'someValue'})
s = vesselapi.VesselAPI(client: http_client)

Authentication

Per-Client Security Schemes

This SDK supports the following security scheme globally:

Name Type Scheme
vessel_api_token apiKey API key

You can set the security parameters through the security optional parameter when initializing the SDK client instance. For example:

import vesselapi
from vesselapi.models import operations, shared

s = vesselapi.VesselAPI(
    security=shared.Security(
        vessel_api_token="<YOUR_API_KEY_HERE>",
    ),
)

req = operations.GetOneConnectionRequest(
    connection_id='string',
)

res = s.connections.find(req)

if res.response_body is not None:
    # handle response
    pass

Per-Operation Security Schemes

Some operations in this SDK require the security scheme to be specified at the request level. For example:

import vesselapi
from vesselapi.models import operations

s = vesselapi.VesselAPI()

req = operations.DeleteConnectionRequestBody(
    connection_id='string',
)

res = s.connections.delete(req, operations.DeleteConnectionSecurity(
    vessel_api_token="<YOUR_API_KEY_HERE>",
))

if res.status_code == 200:
    # handle response
    pass

SDK Generated by Speakeasy

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

vesselapi-5.2.1.tar.gz (47.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vesselapi-5.2.1-py3-none-any.whl (154.5 kB view details)

Uploaded Python 3

File details

Details for the file vesselapi-5.2.1.tar.gz.

File metadata

  • Download URL: vesselapi-5.2.1.tar.gz
  • Upload date:
  • Size: 47.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for vesselapi-5.2.1.tar.gz
Algorithm Hash digest
SHA256 c57cf1853e6bc43dadf53bf4b0ddc85aea3d1263d01cafdaf4f51dd2caab0e63
MD5 1ab5fd51b0446ec9e48c9d984e4fcd1b
BLAKE2b-256 a5505100a6e0b77d2035119a8791db624bf70911bc1db972fc213524f95cd3a1

See more details on using hashes here.

File details

Details for the file vesselapi-5.2.1-py3-none-any.whl.

File metadata

  • Download URL: vesselapi-5.2.1-py3-none-any.whl
  • Upload date:
  • Size: 154.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for vesselapi-5.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 60c3664851731525c31cd71c5559bad4b8731c9085f6cc08d9c11bcf69a37444
MD5 efedab611c634840156436a5254bb562
BLAKE2b-256 bb90314bcae6d1e9ee6699f1bac57d17f22f6428382f25681682b6e1a4e6fde5

See more details on using hashes here.

Supported by

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