Skip to main content

Spro is a secure gateway to privacy-compliant AI interactions.

Project description

Spro Python API Library

Spro is a secure gateway to privacy-compliant AI interactions. It enables users to interact with language models without disclosing sensitive information. Spro automatically detects and masks sensitive data, ensuring that privacy and compliance standards are upheld.

The Spro Python library provides convenient access to the SPRO REST API from any Python 3.8+ application. The library includes type definitions for all request parameters and response fields, offering both synchronous and asynchronous clients powered by httpx.

Note: This library is currently in beta and under active development. Please report any issues or bugs you encounter.

Installation

To install Spro, run the following command:

pip install spro

Usage

To use Spro, import the Spro class from the spro module and create an instance of the class. You can then call the secure method to mask sensitive data in a given text.

from spro import Spro

# Step 1: Set up the Spro client
client = Spro(api_key="your_api_key_here")

# Step 2: Mask sensitive information using the 'secure' method
result = client.secure("My name is John Doe, and my email is john.doe@example.com")

# Step 3: Print the masked result
print(result)

The secure method provides the following parameters:

Field Type Description
prompt string The text you want to redact. This can be any string containing sensitive information.
mask_type string The type of masking to apply. Options include: char (character masking), label(entity masking), enhanced (enhanced entity masking).
mask_char string The character to replace sensitive data with (only used if mask_type is char).
entities array An optional array of specific entities to redact. This is an empty array by default.

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

spro-0.1.0b0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

spro-0.1.0b0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file spro-0.1.0b0.tar.gz.

File metadata

  • Download URL: spro-0.1.0b0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.4 Darwin/23.6.0

File hashes

Hashes for spro-0.1.0b0.tar.gz
Algorithm Hash digest
SHA256 c43670a78f9d9ce564c3206547ab61070916508326e4f675df11c939447a1fd2
MD5 6ec426f226fc70b3681f86fceb45896b
BLAKE2b-256 f1902b8fc584e6fa786ab662785d8065249dc07ad3aaa1aadf4cfb752261f0bc

See more details on using hashes here.

File details

Details for the file spro-0.1.0b0-py3-none-any.whl.

File metadata

  • Download URL: spro-0.1.0b0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.4 Darwin/23.6.0

File hashes

Hashes for spro-0.1.0b0-py3-none-any.whl
Algorithm Hash digest
SHA256 29fd67d808f7c6610a1f3f2483a07244d140ec68ba849f6b28cb3f0e19d54976
MD5 89ce99701cc18120546765c98e0bb856
BLAKE2b-256 12d2d9d16c9b0d20f1245d57e6418af5ad9cc002547b777882e4e5f9c420760d

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