Skip to main content

Safelyx API

pypi

Safelyx API client

Safelyx API client for Python.

You can find the API documentation at https://safelyx.com/safe-api.

Some things to note:

  1. It's simply making an HTTP request to the Safelyx API.

  2. It's using the requests library to make the HTTP request.

  3. If the request to the API fails (HTTP error), it will throw an error, so you might want to wrap it in a try/except block.

Usage

It has a method per API endpoint.

Python

import safelyx

check_result = safelyx.check_link('https://example.com')

print(check_result.result)  # Outputs a safety score between 0 (unsafe) and 10 (safe). -1 if there was an error, -2 if there are no checks remaining.

Installation

pip install safelyx

Development

Requires python 3.11+.

make install
make format
make test

Publishing

After committing and pushing with a new version in pyproject.toml, just run:

make publish

Release files for safelyx 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for safelyx 0.1.1
File Size Uploaded
safelyx-0.1.1.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for safelyx 0.1.1
File Interpreter ABI Platform
safelyx-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / safelyx-0.1.1.tar.gz

Download URL safelyx-0.1.1.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
99dd63f8c64dba89a8fa6752079579d8fec3984b486998ae63f9f1b417583c71
BLAKE2b-256 checksum
How to use checksums
5cd1b2aef8cdcc9500a6f8823305c92826b5e2f66ef3ab239c8f7f81b16fa195
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.10

Release files / safelyx-0.1.1-py3-none-any.whl

Download URL safelyx-0.1.1-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42373da41939f01a593d488062b027d72cdb5f4638e91461d7a87105fdde8ea6
BLAKE2b-256 checksum
How to use checksums
84128a6e879c42c68d04e7e8abf11d1d3aa651cfe253289593078bf390ee6bf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.10

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page