Skip to main content

The SendSafely Client API allows programmatic access to SendSafely and provides a layer of abstraction from our REST API, which requires developers to perform several complex tasks in a correct manner.

Project description

SendSafely Python API

The SendSafely Python API lets you integrate SendSafely secure data transfer capabilities directly into your Python application.

Quickstart

The example below shows you how to install the sendsafely package, import it as a module, and use it to create a package. Make sure that you have Python 3 or higher installed, as well as pip and Setuptools.

To install the SendSafely Python API, simply run

pip install sendsafely

Import the SendSafely modules to start making your API calls

from sendsafely import SendSafely, Package

Create a Sendsafely instance object

sendsafely = SendSafely("https://your-company.sendsafely.com", "API_KEY", "API_SECRET")

Create a new package

package = Package(sendsafely)

Add a secure message to the package

package.encrypt_and_upload_message("hello this is a message")

Add a recipient to the package

package.add_recipient("user@foobar.com")

Finalize the package so it can be delivered to the recipients. The returned response contains the Secure Link needed for recipients to access the package.

response = package.finalize()

You will need to generate your own API_KEY and API_SECRET from the API Keys section of your Profile page when logged into your SendSafely portal.

Examples

sendsafely_python_example.py - demonstrates how the SendSafely Python API can be used to create packages and handle encrypt/upload and download/decrypt operations without the API developer having to implement these complex operations.

python3 sendsafely_python_example.py

sendsafely_rest_example.py - demonstrates how the SendSafely Python API can be used to call SendSafely REST API endpoints directly. This is useful for cases where the SendSafely Python API does not currently implement a function for calling the endpoint.

python3 sendsafely_rest_example.py

Before running the example scripts, you will need to update the api_key, api_secret, and base_url variables in the script before running it.

For more information, please refer to our Developer Website to familiarize yourself with the core SendSafely API and common operations. You can find our documented REST API endpoints here.

Support

For support, please contact support@sendsafely.com.

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

sendsafely-1.0.9.6.tar.gz (94.5 kB view details)

Uploaded Source

File details

Details for the file sendsafely-1.0.9.6.tar.gz.

File metadata

  • Download URL: sendsafely-1.0.9.6.tar.gz
  • Upload date:
  • Size: 94.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for sendsafely-1.0.9.6.tar.gz
Algorithm Hash digest
SHA256 304b643047a567eae91c5b847b2bd8453a00152bfad8d81cbc9749382a977d6e
MD5 a0ecceda3700ee844fe786d760c42f6a
BLAKE2b-256 d1b2a1a43053ddeca7568c4fd93afddf03c39783bed7abd17305dbd3e7e96257

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