@pyrpc/types 0.1.0-alpha.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# @pyrpc/types
|
|
2
|
+
|
|
3
|
+
TypeScript type definitions for [pyRPC](https://pyrpc.dev). Generated by `pyrpc codegen` — reflects your actual Python backend procedures at compile time.
|
|
4
|
+
|
|
5
|
+
## How it works
|
|
6
|
+
|
|
7
|
+
`@pyrpc/types` is a dependency of `@pyrpc/client`. When you install the client, the postinstall script prompts for your server URL and writes real types:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @pyrpc/client
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For CI or automated setups:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
PYRPC_URL=https://api.example.com npm install @pyrpc/client
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Before codegen runs, `Types` resolves to `Record<string, never>`. After codegen, it resolves to your actual procedure signatures — full autocompletion, no boilerplate.
|
|
20
|
+
|
|
21
|
+
## Manual generation
|
|
22
|
+
|
|
23
|
+
If the postinstall prompt is skipped:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install pyrpc-codegen
|
|
27
|
+
pyrpc codegen https://your-server.com
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
By default, types are written to `node_modules/@pyrpc/types/src/index.ts`. Use `--output` to override.
|
|
31
|
+
|
|
32
|
+
## License
|
|
33
|
+
|
|
34
|
+
MIT
|