https://github.com/link89/fire-rpc
Turn fire command line into remote JSON RPC
https://github.com/link89/fire-rpc
Last synced: 2 months ago
JSON representation
Turn fire command line into remote JSON RPC
- Host: GitHub
- URL: https://github.com/link89/fire-rpc
- Owner: link89
- License: mit
- Created: 2025-01-09T08:02:32.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-10T03:35:09.000Z (over 1 year ago)
- Last Synced: 2025-03-10T04:31:59.497Z (over 1 year ago)
- Language: Python
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fire-rpc
Turn fire command line into RPC server.
## Installation
```bash
pip install fire-rpc
```
## Example
`fire-rpc` provides a built-in echo server to demonstrate how to use it.
To start the echo server, run the following command:
```bash
# Note that the yes command is used to workaround the interactive mode of fire
yes | python -m fire_rpc /echo --port 8000
```
To call the echo server, run the following command:
```bash
url -X POST http://localhost:8000/echo -H "Content-Type: application/json" -d '{"args":["Hello World"]}'
```
The echo server will return the following response:
```json
{"result": {"args": ["Hello World"], "kwargs": {}}}
```