{"id":26107104,"url":"https://github.com/rehan-adi/freeapihub-python-sdk","last_synced_at":"2026-05-28T06:44:50.108Z","repository":{"id":281511778,"uuid":"945051065","full_name":"rehan-adi/freeapihub-python-sdk","owner":"rehan-adi","description":"FreeApiHub python sdk","archived":false,"fork":false,"pushed_at":"2025-03-09T16:19:32.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T16:28:21.506Z","etag":null,"topics":["python","python-sdk"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rehan-adi.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-08T14:47:13.000Z","updated_at":"2025-03-09T16:19:35.000Z","dependencies_parsed_at":"2025-03-09T16:38:26.464Z","dependency_job_id":null,"html_url":"https://github.com/rehan-adi/freeapihub-python-sdk","commit_stats":null,"previous_names":["rehan-adi/freeapihub-python-sdk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehan-adi%2Ffreeapihub-python-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehan-adi%2Ffreeapihub-python-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehan-adi%2Ffreeapihub-python-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehan-adi%2Ffreeapihub-python-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rehan-adi","download_url":"https://codeload.github.com/rehan-adi/freeapihub-python-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242762737,"owners_count":20181266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["python","python-sdk"],"created_at":"2025-03-09T22:43:15.857Z","updated_at":"2026-05-28T06:44:50.090Z","avatar_url":"https://github.com/rehan-adi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FreeApiHub SDK (Python)\n\nA Python SDK for **FreeApiHub**, providing simple access to free APIs with support for data retrieval and integration. Ideal for Python projects needing quick API access.\n\n## Features\n\n- **Simple API calls** to interact with different endpoints (e.g., books, jokes, quotes).\n- **Lightweight and efficient** implementation using `httpx`.\n- **Simple integration** into your Python projects.\n\n### 🚀 Docs  \nFreeApiHub API Documentation: [FreeApiHub Docs](https://freeapi-hub.vercel.app/docs)  \n\n### Requirements\n\n- Python 3.7+\n- `httpx` (installed automatically with `pip install freeapihub`)\n\n\n## Installation\n\nInstall the SDK using pip:\n\n### Using pip\n\n```bash\npip install freeapihub\n```\n\n## Usage\n\n### Import the SDK\n\nIn a Python file, import the necessary functions.\n\n```python\nfrom freeapihub import get_all_books, get_book_by_id\n```\n\n### Example 1: Fetching all books\n\n```python\nimport asyncio\nfrom freeapihub import get_all_books\n\nasync def fetch_books():\n    try:\n        books = await get_all_books()\n        print(books)\n    except Exception as e:\n        print(f\"Error fetching books: {e}\")\n\nasyncio.run(fetch_books())\n\n```\n\n### Example 2: Fetch a Book by ID\n\n```python\nimport asyncio\nfrom freeapihub import get_book_by_id\n\nasync def fetch_book(book_id: str):\n    try:\n        book = await get_book_by_id(book_id)\n        print(book)\n    except Exception as e:\n        print(f\"Error fetching book with ID {book_id}: {e}\")\n\nasyncio.run(fetch_book(\"book-id-here\"))\n```\n\n### Available Methods\n\n- `get_all_jokes()`: Fetches all jokes from the API.\n- `get_joke_by_id(joke_id: str)`: Fetches a joke by its ID.\n- `get_all_books()`: Fetches all books from the API.\n- `get_book_by_id(book_id: str)`: Fetches a book by its ID.\n- `get_all_users()`: Fetches all users from the API.\n- `get_user_by_id(user_id: str)`: Fetches a user by their ID.\n- `get_all_stocks()`: Fetches all stock data.\n- `get_stock_by_id(stock_id: str)`: Fetches stock data by its ID.\n- `get_all_quotes()`: Fetches all quotes.\n- `get_quote_by_id(quote_id: str)`: Fetches a quote by its ID.\n- `get_all_products()`: Fetches all products.\n- `get_product_by_id(product_id: str)`: Fetches a product by its ID.\n- `get_all_programming_languages()`: Fetches all programming languages.\n- `get_programming_language_by_id(language_id: str)`: Fetches a programming language by its ID.\n\n## API Documentation\n\nFor detailed documentation on each API endpoint, refer to the FreeApiHub API documentation.\n\n## Contributing\n\nContributions are welcome! Feel free to submit issues or pull requests on GitHub.\n\n\n### Author\n\nCreated by [Rehan](https://github.com/rehan-adi)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frehan-adi%2Ffreeapihub-python-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frehan-adi%2Ffreeapihub-python-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frehan-adi%2Ffreeapihub-python-sdk/lists"}