# 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](https://docs.python.org/3/tutorial/venv.html) 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
Raw data
{
"_id": null,
"home_page": "https://github.com/SendSafely/Python-Client-API",
"name": "sendsafely",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": null,
"keywords": null,
"author": "SendSafely",
"author_email": "support@sendsafely.com",
"download_url": "https://files.pythonhosted.org/packages/e9/a8/f8bf2e2ecdf2a76ef5a0702088600b70e81e38a8e7cfab3e44e580b9d593/sendsafely-1.0.9.2.tar.gz",
"platform": null,
"description": "# SendSafely Python SDK (INTERNAL)\nInstall Python 3 or higher if not already installed\n```\npython3 --version\n```\n```\nbrew install python\n```\nThe Python command to install pip (as pip3) and Setuptools\n```\npython3 -m pip install --upgrade setuptools\n```\nTo create a source distribution\n```\npython3 setup.py sdist --dist-dir=dist\n```\nTo install the source distribution\n```\npython3 -m pip install ./dist/sendsafely-x.y.z.tar.gz\n```\nTo run unittests, update SendSafely instance in the test/*.py scripts, and then run the following from /src:\n```\npython3 -m unittest tests/*.py\n```\nTo run integration scripts, cd to /scripts and run the python script with the following command\n```\npython3 sendsafely_python_example.py\n```\n_When testing, create and activate a [Python virtual environment](https://docs.python.org/3/tutorial/venv.html) and then install the source distribution_\n```\npython3 -m venv ./test/dir\nsource test/dir/bin/activate\n```\nTo create pydocs, run\n```\npydoc3 -w SendSafely sendsafely/*.py\n```\nRemove absolute path names from generated HTML prior to sharing with customer\n\n---\n\n## Prepare for public release\n### 1. Bump Version in `setup.py`\n### 2. Choose a Deployment Method\nProceed with one of the following paths:\n\n#### A. Local Build & Release\nFrom the **Python-Client-API** directory, run:\n```\npython3 setup.py sdist --dist-dir=dist\n```\n\n#### B. CI/CD or PROD Deployment via GitHub Actions\n\n#### CI/CD Workflow\n- **Triggers:** On pull request to `master`, or manually via **manual trigger**\n- **Uploads to:** \n `s3://integrations-deployment/python-client-api/`\n\n#### PROD Workflow\n- **Triggers:** On push to `master` (e.g., after PR merge), or via **manual trigger**\n- **Uploads to:** \n `s3://sendsafely/python-client-api/`\n\n### 3. Test package \n- upload and install by uploading to https://test.pypi.org/ and installing in virtual environment. \n- In virtual environment, run test script to verify working as expected. \n\n### 4. Upload package to pypi\n\n\n",
"bugtrack_url": null,
"license": "Apache License Version 2.0",
"summary": "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.",
"version": "1.0.9.2",
"project_urls": {
"Homepage": "https://github.com/SendSafely/Python-Client-API"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e9a8f8bf2e2ecdf2a76ef5a0702088600b70e81e38a8e7cfab3e44e580b9d593",
"md5": "144bc38874affad585807b775e1e0a0a",
"sha256": "ba9d2a880fb21887e27b2b19198f228869b496d4e743f59ac73fd049c3ac78ff"
},
"downloads": -1,
"filename": "sendsafely-1.0.9.2.tar.gz",
"has_sig": false,
"md5_digest": "144bc38874affad585807b775e1e0a0a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 94241,
"upload_time": "2025-07-16T16:30:11",
"upload_time_iso_8601": "2025-07-16T16:30:11.672445Z",
"url": "https://files.pythonhosted.org/packages/e9/a8/f8bf2e2ecdf2a76ef5a0702088600b70e81e38a8e7cfab3e44e580b9d593/sendsafely-1.0.9.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-16 16:30:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "SendSafely",
"github_project": "Python-Client-API",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "standard-imghdr",
"specs": [
[
"~=",
"3.13.0"
]
]
},
{
"name": "requests",
"specs": [
[
"~=",
"2.32.2"
]
]
},
{
"name": "PGPy",
"specs": [
[
"~=",
"0.6"
]
]
}
],
"lcname": "sendsafely"
}