Unofficial Python client for Firefox Relay
Project description
firefox-relay-api
Unofficial Python client for Firefox Relay. Not affiliated with Mozilla.
⚠️ The Firefox Relay API is not officially documented for third-party use. Endpoints and fields may change without notice.
Install
pip install firefox-relay-api
Requires Python 3.10+.
Quickstart
Get your API key from Relay account settings.
from firefox_relay import FirefoxRelayClient
with FirefoxRelayClient(api_key="your-api-key") as client:
# Create a mask
mask = client.relay_addresses.create(description="for shopping")
print(mask.full_address) # e.g. abc123@mozmail.com
# List all masks
for m in client.relay_addresses.list():
print(m.full_address, "—", m.description)
# Rename
client.relay_addresses.update(mask.id, description="renamed")
# Disable (stop forwarding) without deleting
client.relay_addresses.update(mask.id, enabled=False)
# Delete
client.relay_addresses.delete(mask.id)
Error handling
All errors inherit from RelayError:
from firefox_relay import RelayError, RelayAuthError, RelayRateLimitError
try:
client.relay_addresses.list()
except RelayAuthError:
print("Bad or expired API key")
except RelayRateLimitError as e:
print(f"Rate limited, retry after {e.retry_after}s")
except RelayError as e:
print(f"API error: {e.message} (HTTP {e.status_code})")
Status
v0.1.0 — MVP, supports random masks (/relayaddresses/) only.
Planned for v0.2: domain addresses (premium), profile, runtime data, async client.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file firefox_relay_api-0.1.0rc1.tar.gz.
File metadata
- Download URL: firefox_relay_api-0.1.0rc1.tar.gz
- Upload date:
- Size: 36.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97516f7c3444f73723756ff5d22f3d73f8d7d45f2ac6bb0c9f52a9c433cb2846
|
|
| MD5 |
0d4755a1efc205f524a5b9da71d7196c
|
|
| BLAKE2b-256 |
33cad250bbaf8eec3bb911c60613e314d29742817784eece0bd02d2394adc9b2
|
File details
Details for the file firefox_relay_api-0.1.0rc1-py3-none-any.whl.
File metadata
- Download URL: firefox_relay_api-0.1.0rc1-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
121bc7545fe32446f6bc71708c9b093dea0c5bbb289c6f42a9ecc10332670249
|
|
| MD5 |
3b087ab4f859ac7648c64476f4d2dbd3
|
|
| BLAKE2b-256 |
bc2ff13b66129a36bab44dccf45e67ffed200d57335f69afc35b50fbb785bfca
|