Skip to main content

一些简单好用的命令

Project description

介绍

一些简单好用的命令

1. l0n0lsimplehttpserver

l0n0lsimplehttpserver -h
usage: l0n0lsimplehttpserver [-h] [--host HOST] [--port PORT] [-s] directory

启动一个 aiohttp 静态文件服务器。

positional arguments:
  directory         要提供静态文件的目录路径。

options:
  -h, --help        show this help message and exit
  --host HOST       服务器绑定的主机地址(默认:127.0.0.1)。
  --port PORT       服务器绑定的端口号(默认:8080)。
  -s, --show-index  显示索引目录

1.1 实例

l0n0lsimplehttpserver ./ -s
======== Running on http://0.0.0.0:8080 ========
(Press CTRL+C to quit)

1.2 浏览器访问

alt text

2. l0n0lsimplekvserver

l0n0lsimplekvserver -h
usage: l0n0lsimplekvserver [-h] [--host HOST] [--port PORT]

aiohttp Key-Value 服务器

options:
  -h, --help   show this help message and exit
  --host HOST  监听地址
  --port PORT  监听端口

2.1 实例

l0n0lsimplekvserver 
[INFO] 已创建 tokens.json,令牌: 8f35f0178c5596773f4e95459545f175c483e05b809181c136f95a2eda573f7d
[INFO] 已加载 tokens.json: ['8f35f0178c5596773f4e95459545f175c483e05b809181c136f95a2eda573f7d']
======== Running on http://0.0.0.0:8080 ========
(Press CTRL+C to quit)

2.2 存值

curl -X POST http://127.0.0.1:8080/set -H "Authorization: Bearer 8f35f0178c5596773f4e95459545f175c483e05b809181c136f95a2eda573f7d" -H "Content-Type: application/json"   -d '{"键":"年龄","值":28}'
{"状态": "ok"}

2.3 取值

curl -X POST http://127.0.0.1:8080/get -H "Authorization: Bearer 8f35f0178c5596773f4e95459545f175c483e05b809181c136f95a2eda573f7d" -H "Content-Type: application/json"   -d '{"键":"年龄"}'
{"键": "年龄", "类型": "int", "值": 28}

3. l0n0lsystemctltui(systemctl tui 界面)

l0n0lsystemctltui

4. l0n0lsystemctlgui (systemctl gui 界面)

l0n0lsystemctlgui

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

l0n0lsimple-0.4.1.tar.gz (380.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

l0n0lsimple-0.4.1-py3-none-any.whl (134.7 kB view details)

Uploaded Python 3

File details

Details for the file l0n0lsimple-0.4.1.tar.gz.

File metadata

  • Download URL: l0n0lsimple-0.4.1.tar.gz
  • Upload date:
  • Size: 380.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for l0n0lsimple-0.4.1.tar.gz
Algorithm Hash digest
SHA256 752c8870702432bebe86f947bb5974885e28ad670269fbdcd529d7af00b4b6c2
MD5 6b703a7316d2b60b0555d582fdef5f8a
BLAKE2b-256 e70e036daaa698192371894005ac554669e62178747bbfdedf29ed9ac1c228ff

See more details on using hashes here.

File details

Details for the file l0n0lsimple-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: l0n0lsimple-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 134.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for l0n0lsimple-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3656837bce8416d2eab6454aec9e03b6c230c020fd6b12695aa34d84c674d795
MD5 573f70dcabac1ece9a5e993d2292024b
BLAKE2b-256 ff69d54ae53c6ddb7db55a34e684c1acb8a402faddda700620022aa642197822

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page