tapac-sdk 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tapac_sdk-1.0.0/.gitignore +9 -0
- tapac_sdk-1.0.0/PKG-INFO +68 -0
- tapac_sdk-1.0.0/README.md +55 -0
- tapac_sdk-1.0.0/pyproject.toml +21 -0
- tapac_sdk-1.0.0/tapac_sdk/__init__.py +42 -0
tapac_sdk-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: tapac-sdk
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Official Python SDK for TAPAC — find and verify B2B contacts programmatically.
|
|
5
|
+
Project-URL: Homepage, https://tapacapi.com
|
|
6
|
+
Project-URL: Repository, https://github.com/axelfreeman/tapac-mcp
|
|
7
|
+
Author: Axel Freeman
|
|
8
|
+
License: MIT
|
|
9
|
+
Keywords: b2b,contacts,email-verification,lead-generation,mcp,tapac
|
|
10
|
+
Requires-Python: >=3.9
|
|
11
|
+
Requires-Dist: httpx>=0.24
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# tapac-sdk
|
|
15
|
+
|
|
16
|
+
Official Python SDK for [TAPAC](https://tapacapi.com) — find and verify B2B contacts programmatically.
|
|
17
|
+
|
|
18
|
+
TAPAC scrapes business contacts from company websites, Discord communities, and Telegram channels, then validates emails in real time via SMTP (2–5% bounce rate vs. the 25–35% industry average). This SDK wraps the TAPAC REST API.
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install tapac-sdk
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Quick start
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
from tapac_sdk import TapacClient
|
|
30
|
+
|
|
31
|
+
client = TapacClient(api_key="your-api-key")
|
|
32
|
+
|
|
33
|
+
# Service status
|
|
34
|
+
print(client.status())
|
|
35
|
+
|
|
36
|
+
# Find contacts
|
|
37
|
+
result = client.find_contacts(
|
|
38
|
+
industry="fintech",
|
|
39
|
+
job_titles=["CEO", "CTO"],
|
|
40
|
+
location="Singapore",
|
|
41
|
+
source="website",
|
|
42
|
+
limit=10,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
# Verify emails in real time
|
|
46
|
+
verified = client.verify_emails(["alex@example.com", "sam@example.com"])
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Sandbox mode
|
|
50
|
+
|
|
51
|
+
Pass `sandbox=True` to exercise the API without real lookups:
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
client = TapacClient(sandbox=True)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Authentication
|
|
58
|
+
|
|
59
|
+
Pass your API key to `TapacClient(api_key=...)`. The client sends it as a `Bearer` token. Keys are issued from the TAPAC developer portal at [tapacapi.com/developers](https://tapacapi.com/developers).
|
|
60
|
+
|
|
61
|
+
## Requirements
|
|
62
|
+
|
|
63
|
+
- Python 3.9+
|
|
64
|
+
- [`httpx`](https://www.python-httpx.dev/) (installed automatically)
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
MIT
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# tapac-sdk
|
|
2
|
+
|
|
3
|
+
Official Python SDK for [TAPAC](https://tapacapi.com) — find and verify B2B contacts programmatically.
|
|
4
|
+
|
|
5
|
+
TAPAC scrapes business contacts from company websites, Discord communities, and Telegram channels, then validates emails in real time via SMTP (2–5% bounce rate vs. the 25–35% industry average). This SDK wraps the TAPAC REST API.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install tapac-sdk
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from tapac_sdk import TapacClient
|
|
17
|
+
|
|
18
|
+
client = TapacClient(api_key="your-api-key")
|
|
19
|
+
|
|
20
|
+
# Service status
|
|
21
|
+
print(client.status())
|
|
22
|
+
|
|
23
|
+
# Find contacts
|
|
24
|
+
result = client.find_contacts(
|
|
25
|
+
industry="fintech",
|
|
26
|
+
job_titles=["CEO", "CTO"],
|
|
27
|
+
location="Singapore",
|
|
28
|
+
source="website",
|
|
29
|
+
limit=10,
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
# Verify emails in real time
|
|
33
|
+
verified = client.verify_emails(["alex@example.com", "sam@example.com"])
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Sandbox mode
|
|
37
|
+
|
|
38
|
+
Pass `sandbox=True` to exercise the API without real lookups:
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
client = TapacClient(sandbox=True)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Authentication
|
|
45
|
+
|
|
46
|
+
Pass your API key to `TapacClient(api_key=...)`. The client sends it as a `Bearer` token. Keys are issued from the TAPAC developer portal at [tapacapi.com/developers](https://tapacapi.com/developers).
|
|
47
|
+
|
|
48
|
+
## Requirements
|
|
49
|
+
|
|
50
|
+
- Python 3.9+
|
|
51
|
+
- [`httpx`](https://www.python-httpx.dev/) (installed automatically)
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
MIT
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "tapac-sdk"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Official Python SDK for TAPAC — find and verify B2B contacts programmatically."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "MIT" }
|
|
11
|
+
authors = [{ name = "Axel Freeman" }]
|
|
12
|
+
requires-python = ">=3.9"
|
|
13
|
+
keywords = ["tapac", "b2b", "contacts", "lead-generation", "email-verification", "mcp"]
|
|
14
|
+
dependencies = ["httpx>=0.24"]
|
|
15
|
+
|
|
16
|
+
[project.urls]
|
|
17
|
+
Homepage = "https://tapacapi.com"
|
|
18
|
+
Repository = "https://github.com/axelfreeman/tapac-mcp"
|
|
19
|
+
|
|
20
|
+
[tool.hatch.build.targets.wheel]
|
|
21
|
+
packages = ["tapac_sdk"]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""TAPAC SDK — official Python client for the TAPAC REST API."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
DEFAULT_BASE = "https://tapacapi.com"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class TapacClient:
|
|
10
|
+
def __init__(self, api_key: str | None = None, base_url: str = DEFAULT_BASE, sandbox: bool = False):
|
|
11
|
+
self.api_key = api_key
|
|
12
|
+
self.base_url = base_url.rstrip("/")
|
|
13
|
+
self.sandbox = sandbox
|
|
14
|
+
|
|
15
|
+
def _headers(self) -> dict:
|
|
16
|
+
h = {"Content-Type": "application/json"}
|
|
17
|
+
if self.api_key:
|
|
18
|
+
h["Authorization"] = f"Bearer {self.api_key}"
|
|
19
|
+
if self.sandbox:
|
|
20
|
+
h["X-Sandbox"] = "true"
|
|
21
|
+
return h
|
|
22
|
+
|
|
23
|
+
def _request(self, method: str, path: str, **kwargs):
|
|
24
|
+
r = httpx.request(method, f"{self.base_url}{path}", headers=self._headers(), **kwargs)
|
|
25
|
+
r.raise_for_status()
|
|
26
|
+
return r.json()
|
|
27
|
+
|
|
28
|
+
def status(self) -> dict:
|
|
29
|
+
return self._request("GET", "/v1/status")
|
|
30
|
+
|
|
31
|
+
def find_contacts(self, industry="", job_titles=None, company_size="", location="", source="website", limit=10) -> dict:
|
|
32
|
+
return self._request("POST", "/v1/contacts/search", json={
|
|
33
|
+
"industry": industry,
|
|
34
|
+
"job_titles": job_titles or [],
|
|
35
|
+
"company_size": company_size,
|
|
36
|
+
"location": location,
|
|
37
|
+
"source": source,
|
|
38
|
+
"limit": limit,
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
def verify_emails(self, emails: list[str]) -> dict:
|
|
42
|
+
return self._request("POST", "/v1/contacts/verify", json={"emails": emails})
|