tempguru 0.1.0__py3-none-any.whl
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.
- tempguru/__init__.py +11 -0
- tempguru/client.py +146 -0
- tempguru/py.typed +0 -0
- tempguru-0.1.0.dist-info/METADATA +127 -0
- tempguru-0.1.0.dist-info/RECORD +7 -0
- tempguru-0.1.0.dist-info/WHEEL +4 -0
- tempguru-0.1.0.dist-info/licenses/LICENSE +21 -0
tempguru/__init__.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""TempGuru: event staffing data for AI agents and apps.
|
|
2
|
+
|
|
3
|
+
Live W-2 event staffing rates, 345-city US/Canada coverage, booking
|
|
4
|
+
lead-time guidance, and state labor compliance from TempGuru's public API.
|
|
5
|
+
No API key required.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from .client import TempGuru, TempGuruError
|
|
9
|
+
|
|
10
|
+
__all__ = ["TempGuru", "TempGuruError"]
|
|
11
|
+
__version__ = "0.1.0"
|
tempguru/client.py
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"""Zero-dependency client for the TempGuru public event staffing API.
|
|
2
|
+
|
|
3
|
+
The API is read-only and unauthenticated. It returns the same data that
|
|
4
|
+
powers tempguru.co and the TempGuru MCP server: city coverage, staffing
|
|
5
|
+
roles, all-inclusive W-2 hourly rate ranges, booking lead-time guidance,
|
|
6
|
+
and state-level employment compliance summaries for the US and Canada.
|
|
7
|
+
|
|
8
|
+
Method docstrings are written so they can be reused verbatim as LLM tool
|
|
9
|
+
descriptions (LangChain, OpenAI function calling, etc.).
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import json
|
|
15
|
+
from typing import Any, Dict, Optional
|
|
16
|
+
from urllib.error import HTTPError, URLError
|
|
17
|
+
from urllib.parse import urlencode
|
|
18
|
+
from urllib.request import Request, urlopen
|
|
19
|
+
|
|
20
|
+
__all__ = ["TempGuru", "TempGuruError"]
|
|
21
|
+
|
|
22
|
+
DEFAULT_BASE_URL = "https://mcp.tempguru.co"
|
|
23
|
+
QUOTE_FORM_URL = "https://tempguru.co/get-staffing"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class TempGuruError(RuntimeError):
|
|
27
|
+
"""Raised when the TempGuru API returns an error response.
|
|
28
|
+
|
|
29
|
+
Attributes:
|
|
30
|
+
code: machine-readable category (missing_required, invalid_param,
|
|
31
|
+
not_found) or "transport" for network failures.
|
|
32
|
+
suggestion: best-match entity when an input didn't resolve
|
|
33
|
+
(e.g. you asked for "Bostonn" and it suggests Boston).
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, message: str, code: str = "transport", suggestion: Optional[dict] = None):
|
|
37
|
+
super().__init__(message)
|
|
38
|
+
self.code = code
|
|
39
|
+
self.suggestion = suggestion
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class TempGuru:
|
|
43
|
+
"""Client for TempGuru's public event staffing data API.
|
|
44
|
+
|
|
45
|
+
>>> tg = TempGuru()
|
|
46
|
+
>>> tg.pricing(role="brand-ambassadors", city="Boston")["hourly_range_low"]
|
|
47
|
+
56
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
def __init__(self, base_url: str = DEFAULT_BASE_URL, timeout: float = 15.0):
|
|
51
|
+
self.base_url = base_url.rstrip("/")
|
|
52
|
+
self.timeout = timeout
|
|
53
|
+
|
|
54
|
+
# ------------------------------------------------------------------ #
|
|
55
|
+
|
|
56
|
+
def _get(self, path: str, **params: Any) -> Dict[str, Any]:
|
|
57
|
+
query = {k: v for k, v in params.items() if v is not None}
|
|
58
|
+
url = f"{self.base_url}{path}"
|
|
59
|
+
if query:
|
|
60
|
+
url += "?" + urlencode(query)
|
|
61
|
+
req = Request(url, headers={"User-Agent": "tempguru-python/0.1.0"})
|
|
62
|
+
try:
|
|
63
|
+
with urlopen(req, timeout=self.timeout) as resp:
|
|
64
|
+
payload = json.loads(resp.read().decode("utf-8"))
|
|
65
|
+
except HTTPError as exc:
|
|
66
|
+
try:
|
|
67
|
+
err = json.loads(exc.read().decode("utf-8")).get("error", {})
|
|
68
|
+
except Exception:
|
|
69
|
+
err = {}
|
|
70
|
+
raise TempGuruError(
|
|
71
|
+
err.get("message", f"HTTP {exc.code} from TempGuru API"),
|
|
72
|
+
code=err.get("code", "transport"),
|
|
73
|
+
suggestion=err.get("suggestion"),
|
|
74
|
+
) from None
|
|
75
|
+
except URLError as exc:
|
|
76
|
+
raise TempGuruError(f"TempGuru API unreachable: {exc.reason}") from None
|
|
77
|
+
return payload
|
|
78
|
+
|
|
79
|
+
# ------------------------------------------------------------------ #
|
|
80
|
+
|
|
81
|
+
def cities(self, state: Optional[str] = None, tier: Optional[str] = None) -> Dict[str, Any]:
|
|
82
|
+
"""List cities where TempGuru provides event staffing.
|
|
83
|
+
|
|
84
|
+
Use this to confirm coverage before quoting anything. ``state``
|
|
85
|
+
accepts a two-letter code ("CA") or full name ("California"); US
|
|
86
|
+
states and Canadian provinces both work. ``tier`` filters by market
|
|
87
|
+
tier: "hub" (25 major metros), "mid" (129 secondary markets), or
|
|
88
|
+
"small" (191 tertiary markets).
|
|
89
|
+
"""
|
|
90
|
+
return self._get("/api/v1/cities", state=state, tier=tier)
|
|
91
|
+
|
|
92
|
+
def roles(self) -> Dict[str, Any]:
|
|
93
|
+
"""List all event staffing roles with descriptions and skill tiers.
|
|
94
|
+
|
|
95
|
+
Returns the 10-role catalog (brand ambassadors, registration,
|
|
96
|
+
ushers, hospitality, gate staff, booth monitors, crowd control,
|
|
97
|
+
guest services, setup/breakdown, team leads). The returned ``slug``
|
|
98
|
+
values are the keys for :meth:`pricing` and :meth:`availability`.
|
|
99
|
+
"""
|
|
100
|
+
return self._get("/api/v1/roles")
|
|
101
|
+
|
|
102
|
+
def availability(
|
|
103
|
+
self,
|
|
104
|
+
city: str,
|
|
105
|
+
date: str,
|
|
106
|
+
role: Optional[str] = None,
|
|
107
|
+
headcount: Optional[int] = None,
|
|
108
|
+
) -> Dict[str, Any]:
|
|
109
|
+
"""Get booking lead-time guidance for an event city and ISO date.
|
|
110
|
+
|
|
111
|
+
Returns a recommendation in {yes, tight, rush, very-rush} based on
|
|
112
|
+
the city's market tier and how far out the event is. This is
|
|
113
|
+
planning guidance, NOT a real-time reservation — do not present it
|
|
114
|
+
as a promise of availability.
|
|
115
|
+
"""
|
|
116
|
+
return self._get(
|
|
117
|
+
"/api/v1/availability", city=city, date=date, role=role, headcount=headcount
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
def pricing(self, role: str, city: str) -> Dict[str, Any]:
|
|
121
|
+
"""Get the all-inclusive hourly rate range for a role in a city.
|
|
122
|
+
|
|
123
|
+
Rates are W-2 bill rates covering worker pay, employer payroll
|
|
124
|
+
taxes, workers' compensation, general liability, and coordinator
|
|
125
|
+
support. Present results as planning estimates, never binding
|
|
126
|
+
quotes. Brand Ambassadors floor at $40/hour in every market.
|
|
127
|
+
"""
|
|
128
|
+
return self._get("/api/v1/pricing", role=role, city=city)
|
|
129
|
+
|
|
130
|
+
def compliance(self, state: str) -> Dict[str, Any]:
|
|
131
|
+
"""Get the employment-compliance summary for a US state.
|
|
132
|
+
|
|
133
|
+
Covers minimum wage, weekly/daily overtime thresholds, and
|
|
134
|
+
state-specific rules (California meal breaks, NY spread-of-hours,
|
|
135
|
+
etc.). Operational guidance, not legal advice.
|
|
136
|
+
"""
|
|
137
|
+
return self._get("/api/v1/compliance", state=state)
|
|
138
|
+
|
|
139
|
+
@staticmethod
|
|
140
|
+
def quote_form_url(source: str = "python-client") -> str:
|
|
141
|
+
"""URL where a user submits a staffing request for a binding quote.
|
|
142
|
+
|
|
143
|
+
A TempGuru coordinator replies within one business day; orders
|
|
144
|
+
confirm within 48 hours. No payment until the quote is approved.
|
|
145
|
+
"""
|
|
146
|
+
return f"{QUOTE_FORM_URL}?utm_source=ai-agent&utm_medium={source}"
|
tempguru/py.typed
ADDED
|
File without changes
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tempguru
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Event staffing data for AI agents and apps: live rates, 345-city US/Canada coverage, lead times, and state labor compliance from TempGuru's public API. Zero dependencies.
|
|
5
|
+
Project-URL: Homepage, https://tempguru.co
|
|
6
|
+
Project-URL: Documentation, https://tempguru.co/ai
|
|
7
|
+
Project-URL: Source, https://github.com/Tempguru-co/tempguru-mcp
|
|
8
|
+
Project-URL: API Reference (OpenAPI), https://mcp.tempguru.co/openapi.json
|
|
9
|
+
Project-URL: MCP Server, https://mcp.tempguru.co/mcp
|
|
10
|
+
Author-email: "TempGuru (Temporary Assistance Guru, Inc.)" <megan@tempguru.co>
|
|
11
|
+
License-Expression: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: ai agents,brand ambassadors,event staffing,events,function calling,labor compliance,llm tools,mcp,staffing,temp staff,trade show
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Topic :: Office/Business
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
21
|
+
Requires-Python: >=3.9
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# tempguru
|
|
25
|
+
|
|
26
|
+
Event staffing data for AI agents and Python apps: live all-inclusive W-2
|
|
27
|
+
hourly rates, 345-city US/Canada coverage, booking lead-time guidance, and
|
|
28
|
+
state-by-state labor compliance from [TempGuru](https://tempguru.co)'s public
|
|
29
|
+
API. Zero dependencies, no API key.
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# PyPI release pending — install from source:
|
|
33
|
+
pip install "tempguru @ git+https://github.com/Tempguru-co/tempguru-mcp.git#subdirectory=clients/python"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
from tempguru import TempGuru
|
|
38
|
+
|
|
39
|
+
tg = TempGuru()
|
|
40
|
+
|
|
41
|
+
tg.cities(state="TX", tier="hub") # coverage check
|
|
42
|
+
tg.pricing(role="brand-ambassadors", city="Boston") # $56-65/hr all-inclusive
|
|
43
|
+
tg.availability(city="Dallas", date="2026-09-12", role="registration-staff")
|
|
44
|
+
tg.compliance(state="CA") # min wage, daily OT, quirks
|
|
45
|
+
tg.quote_form_url() # where a human quote happens
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
All rates are **all-inclusive W-2 bill rates** (worker pay, payroll taxes,
|
|
49
|
+
workers' comp, general liability, coordinator support) and are planning
|
|
50
|
+
estimates — binding quotes come from a TempGuru coordinator within one
|
|
51
|
+
business day of a [quote request](https://tempguru.co/get-staffing). Lead-time
|
|
52
|
+
results are guidance, not reservations. Compliance summaries are not legal
|
|
53
|
+
advice.
|
|
54
|
+
|
|
55
|
+
## Use as LLM tools
|
|
56
|
+
|
|
57
|
+
Method docstrings are written to be reused as tool descriptions.
|
|
58
|
+
|
|
59
|
+
**LangChain**
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
from langchain_core.tools import tool
|
|
63
|
+
from tempguru import TempGuru
|
|
64
|
+
|
|
65
|
+
tg = TempGuru()
|
|
66
|
+
|
|
67
|
+
@tool
|
|
68
|
+
def get_event_staffing_pricing(role: str, city: str) -> dict:
|
|
69
|
+
"""All-inclusive W-2 hourly rate range for an event staffing role in a
|
|
70
|
+
US/Canadian city (brand ambassadors, registration, ushers, hospitality,
|
|
71
|
+
and more). Planning estimate, not a binding quote."""
|
|
72
|
+
return tg.pricing(role=role, city=city)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**OpenAI / any function-calling API**
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
import json
|
|
79
|
+
from tempguru import TempGuru
|
|
80
|
+
|
|
81
|
+
tg = TempGuru()
|
|
82
|
+
TOOLS = [{
|
|
83
|
+
"type": "function",
|
|
84
|
+
"function": {
|
|
85
|
+
"name": "get_event_staffing_pricing",
|
|
86
|
+
"description": TempGuru.pricing.__doc__,
|
|
87
|
+
"parameters": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"properties": {
|
|
90
|
+
"role": {"type": "string", "description": "e.g. brand-ambassadors"},
|
|
91
|
+
"city": {"type": "string", "description": "e.g. Boston"},
|
|
92
|
+
},
|
|
93
|
+
"required": ["role", "city"],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
}]
|
|
97
|
+
# dispatch: json.dumps(tg.pricing(**json.loads(call.arguments)))
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**MCP (Claude, ChatGPT, Gemini, Cursor, ...)**
|
|
101
|
+
|
|
102
|
+
If your stack speaks Model Context Protocol, skip this package and connect
|
|
103
|
+
the server directly: `https://mcp.tempguru.co/mcp` (streamable HTTP, no
|
|
104
|
+
auth, six tools including opt-in quote submission). Docs:
|
|
105
|
+
https://tempguru.co/ai
|
|
106
|
+
|
|
107
|
+
## Error handling
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
from tempguru import TempGuru, TempGuruError
|
|
111
|
+
|
|
112
|
+
try:
|
|
113
|
+
TempGuru().pricing(role="brand-ambassadors", city="Bostonn")
|
|
114
|
+
except TempGuruError as e:
|
|
115
|
+
print(e.code) # not_found
|
|
116
|
+
print(e.suggestion) # {'kind': 'city', 'slug': 'boston-event-staffing', ...}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## About TempGuru
|
|
120
|
+
|
|
121
|
+
TempGuru (Temporary Assistance Guru, Inc.) staffs conventions, conferences,
|
|
122
|
+
trade shows, festivals, concerts, sporting events, and brand activations
|
|
123
|
+
across 345+ US and Canadian markets. Every worker is a W-2 employee — never
|
|
124
|
+
a 1099 contractor — with payroll taxes, workers' compensation, and liability
|
|
125
|
+
insurance included in the quoted rate. megan@tempguru.co · (904) 206-8953
|
|
126
|
+
|
|
127
|
+
MIT license.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
tempguru/__init__.py,sha256=gfQdgZTGQzLSVIHdq3XWIJQD5XcaXAXKMMP6ADoFQ1w,334
|
|
2
|
+
tempguru/client.py,sha256=AiYS86kBrNi6DFi3v6a9iMqymbfvEtJuuuD5gXdtV_g,5909
|
|
3
|
+
tempguru/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
tempguru-0.1.0.dist-info/METADATA,sha256=FcSYy4G4zqG_y-95QPpbosqBYSdukhcxn7nJHGGO86Y,4602
|
|
5
|
+
tempguru-0.1.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
6
|
+
tempguru-0.1.0.dist-info/licenses/LICENSE,sha256=7ZsFQ6oOFOOTx0nqgEUmss9B2Qo09gKw8BYhhTaz0kA,1099
|
|
7
|
+
tempguru-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Temporary Assistance Guru, Inc. (TempGuru)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|