{"id":34095741,"url":"https://github.com/mango-philosophy/tealeaf","last_synced_at":"2026-03-08T21:38:00.251Z","repository":{"id":189224711,"uuid":"680305011","full_name":"mango-philosophy/tealeaf","owner":"mango-philosophy","description":"A simple interface for readable Python HTTP clients","archived":false,"fork":false,"pushed_at":"2023-09-05T18:05:08.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-16T19:13:16.791Z","etag":null,"topics":["api","http","json","pydantic","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mango-philosophy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-18T21:21:35.000Z","updated_at":"2023-09-30T15:25:09.000Z","dependencies_parsed_at":"2023-08-18T21:36:16.552Z","dependency_job_id":null,"html_url":"https://github.com/mango-philosophy/tealeaf","commit_stats":null,"previous_names":["jackmuskopf/tealeaf","mango-philosophy/tealeaf"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mango-philosophy/tealeaf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mango-philosophy%2Ftealeaf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mango-philosophy%2Ftealeaf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mango-philosophy%2Ftealeaf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mango-philosophy%2Ftealeaf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mango-philosophy","download_url":"https://codeload.github.com/mango-philosophy/tealeaf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mango-philosophy%2Ftealeaf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30274829,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","http","json","pydantic","python"],"created_at":"2025-12-14T15:18:58.825Z","updated_at":"2026-03-08T21:38:00.246Z","avatar_url":"https://github.com/mango-philosophy.png","language":"Python","readme":"# Tealeaf\n\n[![license](https://img.shields.io/github/license/jackmuskopf/softy.svg)](https://github.com/jackmuskopf/softy/blob/main/LICENSE)\n\nA simple interface for readable Python HTTP clients\n\n- No dependencies \n- Simple and readable\n- Lightweight\n\n\n\u003cbr\u003e\n\n## Installation\n\n```\npip install tealeaf\n```\n\n\u003cbr\u003e\n\n## Usage\n\n\nA simple example\n```python\nimport tealeaf\n\n# simple POST\napi = tealeaf.Api('https://www.postman-echo.com')\napi.post('/post', {\"message\": \"hello tealeaf\"}).json()\n\n# Using bearer tokens\napi = tealeaf.Api(\n    'https://www.postman-echo.com',\n    credentials=tealeaf.BearerToken('my-jwt')\n)\napi.post('/post', {\"message\": \"hello authorized tealeaf\"}).json()\n```\n\n\u003cbr\u003e\n\n\n\nIntegrates easily with `pydantic` for data validation\n```python\nimport tealeaf\nfrom pydantic import BaseModel\n\nclass Message(BaseModel):\n    message: str\n\nclass EchoResponse(BaseModel):\n    data: Message\n    url: str\n\n# simple POST\napi = tealeaf.Api('https://www.postman-echo.com')\necho = api \\\n    .post('/post', {\"message\": \"hello tealeaf\"}) \\\n    .astype(EchoResponse)\n\nprint(repr(echo))\n```\n\n```\n\u003e\u003e\u003e EchoResponse(data=Message(message='hello tealeaf'), url='https://www.postman-echo.com/post')\n```\n\n\u003cbr\u003e\n\nAn example with custom auth algorithm:\n```python\n# define a custom auth handler with a `preprocess_request` method\nclass CustomCredentialHandler(tealeaf.ApiCredential):\n\n    def __init__(self, secret: str):\n        super().__init__()\n        self.__secret = secret\n\n    def preprocess_request(self, request: tealeaf.Request):\n        # your algorithm goes here and modifies the request object\n        request.headers['secret-key'] = f'{request.data}{self.__secret}'\n        return request\n\napi = tealeaf.Api(\n    'https://www.postman-echo.com',\n    credentials=CustomCredentialHandler('my-super-secret')\n)\napi.post('/post', {\"message\": \"hello custom tealeaf auth\"}).json()\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmango-philosophy%2Ftealeaf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmango-philosophy%2Ftealeaf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmango-philosophy%2Ftealeaf/lists"}