官网

https://github.com/laixintao/iredis

下载

pip install iredis

用法

  1. # iredis --help
  2. Usage: iredis [OPTIONS] [CMD]...
  3. IRedis: Interactive Redis
  4. When no command is given, IRedis starts in interactive mode.
  5. Examples:
  6. - iredis
  7. - iredis -d dsn
  8. - iredis -h 127.0.0.1 -p 6379
  9. - iredis -h 127.0.0.1 -p 6379 -a <password>
  10. - iredis --url redis://localhost:7890/3
  11. Type "help" in interactive mode for information on available commands and
  12. settings.
  13. Options:
  14. -h TEXT Server hostname (default: 127.0.0.1).
  15. -p TEXT Server port (default: 6379).
  16. -s, --socket TEXT Server socket (overrides hostname and port).
  17. -n TEXT Database number.(overwrites dsn/url's db number)
  18. -a, --password TEXT Password to use when connecting to the server.
  19. --url TEXT Use Redis URL to indicate connection(Can set with
  20. env `IREDIS_URL`), Example:
  21. redis://[[username]:[password]]@localhost:6379/0
  22. rediss://[[username]:[password]]@localhost:6379/0
  23. unix://[[username]:[password]]@/path/to/socket.soc
  24. k?db=0
  25. -d, --dsn TEXT Use DSN configured into the [alias_dsn] section of
  26. iredisrc file. (Can set with env `IREDIS_DSN`)
  27. --newbie / --no-newbie Show command hints and useful helps.
  28. --iredisrc TEXT Config file for iredis, default is ~/.iredisrc.
  29. --decode TEXT decode response, default is No decode, which will
  30. output all bytes literals.
  31. --raw / --no-raw Use raw formatting for replies (default when
  32. STDOUT is not a tty). However, you can use --no-
  33. raw to force formatted output even when STDOUT is
  34. not a tty.
  35. --rainbow / --no-rainbow Display colorful prompt.
  36. --shell / --no-shell Allow to run shell commands, default to True.
  37. --pager / --no-pager Using pager when output is too tall for your
  38. window, default to True.
  39. --version Show the version and exit.
  40. --help Show this message and exit.