capsarsiv
Türkçe Caps Arşivi Python SDK ve CLI aracı.
Türkçe Caps Arşivi API'sine erişmek için Python SDK ve komut satırı aracı.
Kurulum
pip install capsarsiv
API Key
API key almak için:
- capsarsiv.com/uyelik sayfasından giriş yapın.
- Hesap altındaki developer API bölümünde API key oluştur'a tıklayın.
- Key yalnızca oluşturulduğu anda bir kez gösterilir; güvenli bir yerde saklayın.
Key'inizi ortam değişkeni olarak ayarlayın:
export CAPSARSIV_API_KEY="senin_api_keyin"
Python SDK
from capsarsiv import CapsArsiv
# Context manager ile kullanım (önerilir)
with CapsArsiv() as client:
# Capsleri listele
caps_list = client.caps(sort="popular", limit=10)
for c in caps_list:
print(f"{c.title} — puan: {c.score}")
# Arama yap
results = client.caps(q="futbol", sort="popular")
# Tag ile filtrele
spor_caps = client.caps(tag="spor", limit=5)
# Rastgele caps getir
rastgele = client.random()
print(f"Rastgele: {rastgele.title}")
# Slug ile detay getir
caps = client.get("ornek-caps")
print(caps.image_url)
# Tagleri listele
tags = client.tags(limit=20)
for t in tags:
print(f"#{t.name} ({t.count} caps)")
# Caps görselini indir
filepath = client.download("ornek-caps", directory="./caps")
print(f"İndirildi: {filepath}")
API Key'i parametre olarak verme
client = CapsArsiv(api_key="senin_api_keyin")
CLI Kullanımı
# Capsleri listele
capsarsiv caps
capsarsiv caps --sort popular --limit 10
capsarsiv caps --query futbol
capsarsiv caps --tag spor
# Rastgele caps
capsarsiv random
# Caps detayı
capsarsiv get ornek-caps
# Tagleri listele
capsarsiv tags
capsarsiv tags --limit 20
# Caps görselini indir
capsarsiv download ornek-caps
capsarsiv download ornek-caps -o ./caps/
# JSON çıktı
capsarsiv --json caps --limit 5
capsarsiv --json random
# Yardım
capsarsiv --help
capsarsiv caps --help
CLI ile API Key
# Ortam değişkeni (önerilir)
export CAPSARSIV_API_KEY="senin_api_keyin"
capsarsiv caps
# Parametre olarak
capsarsiv --api-key "senin_api_keyin" caps
Hata Yönetimi
from capsarsiv import CapsArsiv, NotFoundError, RateLimitError, AuthenticationError
with CapsArsiv() as client:
try:
caps = client.get("olmayan-caps")
except NotFoundError:
print("Caps bulunamadı!")
except RateLimitError:
print("İstek limiti aşıldı, lütfen bekleyin.")
except AuthenticationError:
print("API key geçersiz!")
API Limitleri
- Dakikada en fazla 60 istek
- Aylık 1000 istek (key başına)
Lisans
MIT — detaylar için LICENSE dosyasına bakın.
Metadata
Release files for capsarsiv 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| capsarsiv-0.1.0.tar.gz | 13.7 kB | Without provenance | Details for capsarsiv-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| capsarsiv-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for capsarsiv-0.1.0-py3-none-any.whl |
Total release size: 24.7 kB
Release files / capsarsiv-0.1.0.tar.gz
| Download URL | capsarsiv-0.1.0.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fc8b20a0458f4d4c74a09c9dd88f25cc746d689e19576b4efef824adb4c65f1
|
|
BLAKE2b-256 checksum How to use checksums |
86599e21491d7d2837653712939847802f80c5376b88a92b579ce723e150d880
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / capsarsiv-0.1.0-py3-none-any.whl
| Download URL | capsarsiv-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ebb20c3c3d6edfd3bc67ae8b42e791aedd365e1efea189759d170129fd83d80
|
|
BLAKE2b-256 checksum How to use checksums |
648345490262e452c74c99a23ed2bfe1c60519fb538095be897ee2beda2bf06d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for capsarsiv 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.