Skip to main content

Boss Request

Патч для библиотек httpx и curl-cffi, расширяет оригинальный функционал:

  1. json_clean() - Нормализует невалидные json:
  2. export_cookies() - Экспорта куки в браузерный формат
  3. import_cookies(json) - Импорт куки в браузерный формат
  4. Можно вызывать прямо из response или client
  5. Одинаковый интерфейс для httpx и curl-cffi

Установка

uv add boss-request | pip install boss-request

Патч для curl-cffi (требует установки оригинального curl-cffi)

from bose_request import BossAsyncSessionCurlCffi
uv add curl-cffi | pip install curl-cffi

Патч для httpx (требует установки оригинального httpx)

from bose_request import BossAsyncClientHttpx
uv add httpx | pip install httpx

Переноси куки прям из браузера

img_3.png

Вызови import_cookies(json) - вставь json

async with BossAsyncSessionCurlCffi() as client:
    await client.get("https://claude.ai/api/organizations")

    cookies = client.import_cookies(json)
    
    

Или же экспорт куки в браузер

async with BossAsyncSessionCurlCffi() as client:
    await client.get("https://claude.ai/api/organizations")

    cookies_json = client.export_cookies()
    
    # Или возьми сессонные куки прямо из response
    response = await client.get("https://google.com/")
    cookies_json = response.export_cookies() 
    
    # Или экспортируй в формате dict
    response = await client.get("https://google.com/")
    cookies_dict = response.export_cookies("dict") 
    
    # Результат
    {'__fcd': 'OQKJQOVUCAZWJXHN','isRedirectLang': '1',}


    

Нормализуй невалидный json

async with BossAsyncSessionCurlCffi() as client:
    response = await client.get("https://claude.ai/api/organizations")
    
    #Новый метод
    valid_json = response.json_clean()
    
    #Оригинальный метод остался на месте
    ivnalid_json = response.json()
    
    

Библиотека на изменяет оригинальный функционал, она лишь дополняет

Metadata

Release files for boss-request 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for boss-request 0.0.7
File Size Uploaded Provenance Actions
boss_request-0.0.7.tar.gz 12.1 kB Without provenance Details for boss_request-0.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for boss-request 0.0.7
File Interpreter ABI Platform Actions
boss_request-0.0.7-py3-none-any.whl Python 3 none any Details for boss_request-0.0.7-py3-none-any.whl

Total release size: 25.7 kB

Release files / boss_request-0.0.7.tar.gz

Download URL boss_request-0.0.7.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b79adcf5da5d6b2ccf288e43c5f68a2e2ed955e8194cf0cd725301c30264a8c3
BLAKE2b-256 checksum
How to use checksums
e82a6e943cff20cabef538f05a11012a4c041fad07a5db41dc35ebbb18d92870
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.18

Release files / boss_request-0.0.7-py3-none-any.whl

Download URL boss_request-0.0.7-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33511f93cf3ae0fe4316800bbcef6cd8d150629b0d063077f7e20067d8f9bb81
BLAKE2b-256 checksum
How to use checksums
f8686a648926e1631b940cb9fee186205444024d9f3da30577ea6dd3acc971cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.18

Security for boss-request 0.0.7

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page