Skip to content

Commit 1c2ae70

Browse files
📝 Update Readme.
1 parent 8d01abb commit 1c2ae70

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

‎Readme.md‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,18 @@ Python DSL for Web API clients.
66

77
http://lapidary.dev/
88

9-
Also check [lapidary-render](https://github.com/python-lapidary/lapidary-render/),
10-
a command line program that generates Lapidary clients from OpenAPI.
9+
## Why
1110

12-
## Usage:
11+
DRY. Web API clients follow a relatively small set of patterns and writing them is rather repetitive task. Encoding these patterns in form of a DSL library frees its users from implementing the same patterns over and over again.
12+
13+
## How
14+
15+
Lapidary is an internal DSL made of decorators and annotations, that can be used to describe Web APIs similarly to OpenAPI
16+
([lapidary-render](https://github.com/python-lapidary/lapidary-render/) can convert a large subset of OpenAPI 3.0 to Lapidary).
17+
18+
At runtime, the library interprets user-provided function declarations (without bodies), and makes them behave as declared. If a function accepts parameter of type `X` and returns `Y`, Lapidary will try to convert `X` to HTTP request and the response to `Y`.
19+
20+
### Example:
1321

1422
```python
1523
class CatClient(ClientBase):

0 commit comments

Comments
 (0)