소스 정보
- 저장소
- majiayu000/claude-skill-registry
- 최근 소스 활동
- 2026년 6월 23일 12:15
- 감지된 SKILL.md 언어
- 영어
- 스타
- 543
- 포크
- 85
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/majiayu000/claude-skill-registry --skill requests명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | requests |
| description | Synchronous HTTP client for sending HTTP requests and handling responses. |
| version | 2.32.5 |
| ecosystem | python |
| license | MIT |
| generated_with | gpt-5.2 |
import requests
from requests import Session
from requests.auth import HTTPBasicAuth, HTTPDigestAuth, AuthBase
from requests.exceptions import (
RequestException,
Timeout,
ConnectTimeout,
ReadTimeout,
ConnectionError,
HTTPError,
TooManyRedirects,
JSONDecodeError,
)
from __future__ import annotations
import requests
def fetch_repo(owner: str, repo: str) -> dict:
url = "https://api.github.com/repos/{owner}/{repo}".format(owner=owner, repo=repo)
r = requests.get(url, params={"per_page": 1}, timeout=10)
r.raise_for_status()
return r.json()
if __name__ == "__main__":
data = fetch_repo("psf", "requests")
print(data["full_name"])
params= for query strings; call Response.raise_for_status() before trusting the body.from __future__ import annotations
import requests
def create_widget(api_base: str, token: str, name: str) -> dict:
url = f"{api_base}/post"
headers = {"Authorization": f"Bearer {token}"}
r = requests.post(
url,
json={"name": name},
headers=headers,
timeout=10,
)
r.raise_for_status()
return r.json()
if __name__ == "__main__":
# Example: using httpbin.org/post to echo back JSON
api_base = "https://httpbin.org"
token = "testtoken123"
name = "mywidget"
result = create_widget(api_base, token, name)
# httpbin.org returns JSON with keys: json, headers, url, etc.
assert isinstance(result, dict)
# The JSON body should be echoed back under "json"
assert result.get("json") == {"name": name}
# The Authorization header should be present (case-insensitive)
headers = result.get("headers", {})
authval = headers.get("Authorization") or headers.get("authorization")
assert authval and token in authval
# The URL should end with /post
assert result.get("url", "").endswith()
()
json= for JSON request bodies (sets JSON encoding; also sets an appropriate Content-Type).from __future__ import annotations
import requests
def fetch_many(urls: list[str]) -> list[tuple[str, int]]:
results: list[tuple[str, int]] = []
with requests.Session() as s:
s.headers.update({"User-Agent": "example-client/1.0"})
for url in urls:
r = s.get(url, timeout=10)
results.append((r.url, r.status_code))
return results
if __name__ == "__main__":
out = fetch_many(["https://httpbin.org/get", "https://example.com/"])
print(out)
requests.Session() (or requests.session()) for connection pooling and shared headers/cookies.from __future__ import annotations
import requests
def download_file(url: str, path: str) -> None:
with requests.get(url, stream=True, timeout=30) as r:
r.raise_for_status()
with open(path, "wb") as f:
for chunk in r.iter_content(chunk_size=1024 * 128):
if chunk: # filter out keep-alive chunks
f.write(chunk)
if __name__ == "__main__":
download_file("https://httpbin.org/bytes/1024", "out.bin")
print("Wrote out.bin")
stream=True and Response.iter_content(); write to a binary file.from __future__ import annotations
import requests
from requests.auth import AuthBase, HTTPBasicAuth, HTTPDigestAuth
class BearerAuth(AuthBase):
def __init__(self, token: str) -> None:
self._token = token
def __call__(self, r: requests.PreparedRequest) -> requests.PreparedRequest:
r.headers["Authorization"] = f"Bearer {self._token}"
return r
def demo_auth() -> None:
# Basic auth (tuple shorthand also works: auth=("user", "pass"))
r1 = requests.get("https://httpbin.org/basic-auth/user/pass", auth=HTTPBasicAuth("user", "pass"), timeout=10)
print(r1.status_code)
# Digest auth
r2 = requests.get("https://httpbin.org/digest-auth/auth/user/pass", auth=HTTPDigestAuth("user", "pass"), timeout=10)
print(r2.status_code)
# Custom auth
r3 = requests.get("https://httpbin.org/bearer", auth=BearerAuth("secret-token"), timeout=10)
print(r3.status_code)
if __name__ == "__main__":
demo_auth()
auth=("user","pass") or HTTPBasicAuth for Basic; HTTPDigestAuth for Digest; subclass AuthBase for custom schemes.timeout= (float seconds or (connect, read) tuple) to avoid hanging indefinitely.allow_redirects= (e.g., requests.get(..., allow_redirects=False)).verify=True). Override per request with verify=False (discouraged) or verify="/path/to/ca-bundle.pem".proxies= dict or environment variables (e.g., HTTPS_PROXY, HTTP_PROXY, NO_PROXY) when Session.trust_env is True..netrc for credentials when auth= is not provided. Disable by setting Session.trust_env = False.Response.encoding manually only when you know the correct encoding before accessing Response.text.from __future__ import annotations
import requests
r = requests.get("https://httpbin.org/status/500", timeout=10)
data = r.json() # may succeed/fail independently of HTTP status
print(data)
from __future__ import annotations
import requests
r = requests.get("https://httpbin.org/status/500", timeout=10)
r.raise_for_status()
print(r.json())
from __future__ import annotations
import requests
r = requests.get("https://httpbin.org/status/204", timeout=10)
print(r.json()) # raises requests.exceptions.JSONDecodeError
from __future__ import annotations
import requests
from requests.exceptions import JSONDecodeError
r = requests.get("https://httpbin.org/status/204", timeout=10)
if r.status_code == 204:
print(None)
else:
try:
print(r.json())
except JSONDecodeError:
print(None)
from __future__ import annotations
import requests
r = requests.get("https://httpbin.org/bytes/10", timeout=10)
raw_bytes = r.raw.read() # not the intended pattern without stream=True
print(raw_bytes)
from __future__ import annotations
import requests
with requests.get("https://httpbin.org/bytes/10", stream=True, timeout=10) as r:
r.raise_for_status()
data = b"".join(r.iter_content(chunk_size=4))
print(data)
from __future__ import annotations
import requests
s = requests.Session()
# May consult environment (.netrc, proxy env vars, etc.) by default:
r = s.get("https://example.com/private", timeout=10)
print(r.status_code)
from __future__ import annotations
import requests
s = requests.Session()
s.trust_env = False
r = s.get("https://example.com/private", timeout=10)
print(r.status_code)
<2.32.5 temporarily and upgrade Python.HTTPAdapter, Requests introduced a new public method for connection acquisition with TLS context (get_connection_with_tls_context) and considers get_connection deprecated in Requests >=2.32.0. Update adapter overrides accordingly.>=2.31.0 to avoid potential Proxy-Authorization leakage on HTTPS redirects; rotate proxy credentials after upgrading.headers, timeout, auth, cookies, allow_redirects, proxies, verify, cert, stream.json= for JSON bodies.allow_redirects=)..get()/.post() etc.; configure headers, cookies, proxies, verify, trust_env.requests.Session..status_code, .headers, .url, .text, .content, .encoding, .json(), .raise_for_status(), .iter_content(), .raw (with stream=True).timeout= to control.Response.raise_for_status() on 4xx/5xx.{
"library_category": "http_client",
"apis": [
{
"name": "requests.get",
"type": "function",
"signature": "get(url, params=None, **kwargs)",
"signature_truncated": false,
"return_type": "Response",
"module": "requests.api",
"publicity_score": "high",
"module_type": "public",
"decorators": [],
"deprecation": {
"is_deprecated": false
},
"type_hints"
Notes:
requests/__init__.py and __all__ patterns).requests.utils), let me know.Response or Session, specify, and a more granular breakdown can be provided.http_client as the category.<2.32.5 temporarily and upgrade Python as soon as possible.HTTPAdapter, use the new get_connection_with_tls_context method instead of the now-deprecated get_connection. See the Requests changelog and PR #6710 for migration examples.>=2.31.0 to avoid possible Proxy-Authorization header leakage on HTTPS redirects. Rotate proxy credentials after upgrading.No core HTTP API endpoints were removed or had their signatures changed in 2.32.x.
Response.json() on invalid/empty JSON.requests.codes.ok).