New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vesselapi

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vesselapi

Python Client SDK Generated by Speakeasy

  • 5.2.1
  • PyPI
  • Socket score

Maintainers
1

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

tasks

users

  • 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 ObjectStatus CodeContent Type
errors.SDKError400-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:

#ServerVariables
0https://api.vessel.landNone
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:

NameTypeScheme
vessel_api_tokenapiKeyAPI 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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc