Metadata-Version: 2.1
Name: instant-api-client
Version: 0.1.0
Summary: Create API wrappers/clients in minutes, enjoying both blocking and async interfaces from one codebase!
Home-page: https://github.com/FalseDev/instant-api-client
Author: FalseDev
License: MIT
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: httpx (==0.16.1)

# Introduction

If you've ever tried to make an API wrapper
you probably know that the code written can
only be used as sync or async, well, not anymore.

## Features

- **Lightweight**: Extremely lightweight and minimal
- **Easy to use**: Implement features in no time with the
- **Async and blocking**: Provides both async and blocking calls
- **Test without a server**: Since the library internally uses httpx, it can be used to test itself using an `ASGI` or `WSGI` application.
- **DRY**: _Don't repeat yourself_, helps avoid code duplication and write reusable code
- **Routing**: An `APIRouter` class with simliar API to `APIClient`
- **Modular**: Create reusable routers that can be added to any client, independant of each other

## Example Usage

```py

from apiclient import APIClient, endpoint, Post

class CodeExecClient(APIClient):
  base_url = "https://pathtomysite.com/api/1.0"   # Note the missing / suffix
  @endpoint
  def run(self, language:str, code:str):
    # Do any processing with the data here!
    # Also note the / prefix in the url
    return Post("/execute", params={'lang':language, 'code':code})

```

## Documentation is under works


