You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

sendsafely

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sendsafely

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.

1.0.9.2
pipPyPI
Maintainers
1

SendSafely Python SDK (INTERNAL)

Install Python 3 or higher if not already installed

python3 --version
brew install python

The Python command to install pip (as pip3) and Setuptools

python3 -m pip install --upgrade setuptools

To create a source distribution

python3 setup.py sdist --dist-dir=dist

To install the source distribution

python3 -m pip install ./dist/sendsafely-x.y.z.tar.gz

To run unittests, update SendSafely instance in the test/*.py scripts, and then run the following from /src:

python3 -m unittest tests/*.py

To run integration scripts, cd to /scripts and run the python script with the following command

python3 sendsafely_python_example.py

When testing, create and activate a Python virtual environment and then install the source distribution

python3 -m venv ./test/dir
source test/dir/bin/activate

To create pydocs, run

pydoc3 -w SendSafely sendsafely/*.py

Remove absolute path names from generated HTML prior to sharing with customer

Prepare for public release

1. Bump Version in setup.py

2. Choose a Deployment Method

Proceed with one of the following paths:

A. Local Build & Release

From the Python-Client-API directory, run:

python3 setup.py sdist --dist-dir=dist

B. CI/CD or PROD Deployment via GitHub Actions

CI/CD Workflow

  • Triggers: On pull request to master, or manually via manual trigger
  • Uploads to:
    s3://integrations-deployment/python-client-api/

PROD Workflow

  • Triggers: On push to master (e.g., after PR merge), or via manual trigger
  • Uploads to:
    s3://sendsafely/python-client-api/

3. Test package

  • upload and install by uploading to https://test.pypi.org/ and installing in virtual environment.
  • In virtual environment, run test script to verify working as expected.

4. Upload package to pypi

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