fastpluggy-redis 0.0.13__tar.gz

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.

Potentially problematic release.


This version of fastpluggy-redis might be problematic. Click here for more details.

@@ -0,0 +1,12 @@
1
+ # Include all Python files
2
+ recursive-include src *.py
3
+
4
+ # Include all template files
5
+ recursive-include src/templates *.html *.j2
6
+
7
+ # Include all static files (CSS, JS, etc.)
8
+ recursive-include src/static *
9
+
10
+ # Include README and license files
11
+ include README.md
12
+ include LICENSE
@@ -0,0 +1,156 @@
1
+ Metadata-Version: 2.4
2
+ Name: fastpluggy-redis
3
+ Version: 0.0.13
4
+ Summary: Redis Tools plugin for Fastpluggy
5
+ Author: FastPluggy Team
6
+ Requires-Python: >=3.10
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: redis
9
+ Requires-Dist: fastpluggy-ui-tools>=0.0.4
10
+
11
+ # Redis Tools for FastPluggy
12
+
13
+ ![Redis Tools](https://img.shields.io/badge/FastPluggy-Redis%20Tools-red)
14
+ ![Version](https://img.shields.io/badge/version-0.0.7-blue)
15
+
16
+ A powerful Redis browser and management plugin for FastPluggy applications.
17
+ This plugin provides a user-friendly interface to browse, search, and manage Redis databases and keys.
18
+
19
+ ## Features
20
+
21
+ - **Redis Browser UI**: Intuitive web interface to browse and manage Redis data
22
+ - **Multi-Database Support**: Switch between Redis databases easily
23
+ - **Key Management**: View, search, and delete Redis keys
24
+ - **Data Type Support**: Full support for all Redis data types (string, list, hash, set, zset)
25
+ - **Pickled Data Handling**: Automatic detection and unpickling of Python pickled data
26
+ - **TTL Management**: View time-to-live for keys
27
+ - **Database Flushing**: Clear entire databases with confirmation
28
+ - **Scheduled Cleanup**: Optional scheduled task to clean expired keys (requires tasks_worker plugin)
29
+
30
+ ## Installation
31
+
32
+ 1. Install the official plugin package:
33
+
34
+ ```bash
35
+ pip install fastpluggy-plugins
36
+ ```
37
+ or
38
+ ```bash
39
+ pip install fastpluggy-plugin-redis
40
+ ```
41
+
42
+ 2. Add the plugin to your FastPluggy application:
43
+
44
+ There are several ways to add the plugin to your FastPluggy application:
45
+
46
+ #### Method 1: Using the Admin Interface
47
+
48
+ 1. Navigate to `/admin/plugins` in your FastPluggy application
49
+ 2. Click on "Install New Plugin"
50
+ 3. Enter "redis_tools" as the plugin name
51
+ 4. Click "Install"
52
+
53
+ #### Method 2: Using the Configuration File
54
+
55
+ Add the plugin to your FastPluggy configuration file:
56
+
57
+ ```python
58
+ # config.py
59
+ FASTPLUGGY_PLUGINS = [
60
+ # other plugins...
61
+ "redis_tools",
62
+ ]
63
+ ```
64
+
65
+ #### Method 3: Programmatically
66
+
67
+ Add the plugin programmatically in your application code:
68
+
69
+ ```python
70
+ from fastapi import FastAPI
71
+ from fastpluggy import FastPluggy
72
+
73
+ app = FastAPI()
74
+ pluggy = FastPluggy(app)
75
+
76
+ # Add the Redis Tools plugin
77
+ pluggy.add_plugin("redis_tools")
78
+ ```
79
+
80
+ For more detailed installation and configuration instructions, see the [Installation Guide](docs/installation.md).
81
+
82
+ ## Configuration
83
+
84
+ Configure Redis Tools through environment variables or directly in your FastPluggy configuration:
85
+
86
+ | Setting | Description | Default |
87
+ |---------|-------------|---------|
88
+ | `REDIS_DSN` | Redis connection string (overrides other connection settings if provided) | `None` |
89
+ | `redis_host` | Redis server hostname | `localhost` |
90
+ | `redis_port` | Redis server port | `6379` |
91
+ | `redis_db` | Default Redis database index | `0` |
92
+ | `use_ssl` | Whether to use SSL for Redis connection | `False` |
93
+ | `redis_password` | Redis server password | `None` |
94
+ | `redis_decode_responses` | Whether to decode Redis responses | `False` |
95
+ | `keys_limit` | Maximum number of keys to display | `100` |
96
+
97
+
98
+ ## Usage
99
+
100
+ ### Web Interface
101
+
102
+ Once installed, access the Redis browser at `/redis_tools/` in your FastPluggy application. The interface allows you to:
103
+
104
+ 1. Select and switch between Redis databases
105
+ 2. Search for keys using patterns (e.g., `user:*`)
106
+ 3. View key details including type, TTL, and size
107
+ 4. Examine and format key values based on their data type
108
+ 5. Delete individual keys
109
+ 6. Flush entire databases
110
+
111
+ ### Programmatic Usage
112
+
113
+ You can also use the Redis Tools connector in your code:
114
+
115
+ ```python
116
+ from redis_tools.redis_connector import RedisConnection
117
+
118
+ # Create a connection
119
+ redis_conn = RedisConnection()
120
+
121
+ # Test connection
122
+ if redis_conn.test_connection():
123
+ # Get all keys matching a pattern
124
+ keys = redis_conn.get_keys("user:*")
125
+
126
+ # Get details for a specific key
127
+ key_details = redis_conn.get_key_details("user:1001")
128
+
129
+ # Switch to another database
130
+ redis_conn.select_db(2)
131
+
132
+ # Delete a key
133
+ redis_conn.delete_key("temporary_key")
134
+ ```
135
+
136
+ ## Development
137
+
138
+ ### Requirements
139
+
140
+ - Python 3.10+
141
+ - FastPluggy
142
+ - Redis
143
+
144
+ ### Testing
145
+
146
+ Run tests with pytest:
147
+
148
+ ```bash
149
+ cd redis_tools
150
+ pip install -r tests/requirements.txt
151
+ pytest
152
+ ```
153
+
154
+ ## License
155
+
156
+ This project is licensed under the MIT License - see the LICENSE file for details.
@@ -0,0 +1,146 @@
1
+ # Redis Tools for FastPluggy
2
+
3
+ ![Redis Tools](https://img.shields.io/badge/FastPluggy-Redis%20Tools-red)
4
+ ![Version](https://img.shields.io/badge/version-0.0.7-blue)
5
+
6
+ A powerful Redis browser and management plugin for FastPluggy applications.
7
+ This plugin provides a user-friendly interface to browse, search, and manage Redis databases and keys.
8
+
9
+ ## Features
10
+
11
+ - **Redis Browser UI**: Intuitive web interface to browse and manage Redis data
12
+ - **Multi-Database Support**: Switch between Redis databases easily
13
+ - **Key Management**: View, search, and delete Redis keys
14
+ - **Data Type Support**: Full support for all Redis data types (string, list, hash, set, zset)
15
+ - **Pickled Data Handling**: Automatic detection and unpickling of Python pickled data
16
+ - **TTL Management**: View time-to-live for keys
17
+ - **Database Flushing**: Clear entire databases with confirmation
18
+ - **Scheduled Cleanup**: Optional scheduled task to clean expired keys (requires tasks_worker plugin)
19
+
20
+ ## Installation
21
+
22
+ 1. Install the official plugin package:
23
+
24
+ ```bash
25
+ pip install fastpluggy-plugins
26
+ ```
27
+ or
28
+ ```bash
29
+ pip install fastpluggy-plugin-redis
30
+ ```
31
+
32
+ 2. Add the plugin to your FastPluggy application:
33
+
34
+ There are several ways to add the plugin to your FastPluggy application:
35
+
36
+ #### Method 1: Using the Admin Interface
37
+
38
+ 1. Navigate to `/admin/plugins` in your FastPluggy application
39
+ 2. Click on "Install New Plugin"
40
+ 3. Enter "redis_tools" as the plugin name
41
+ 4. Click "Install"
42
+
43
+ #### Method 2: Using the Configuration File
44
+
45
+ Add the plugin to your FastPluggy configuration file:
46
+
47
+ ```python
48
+ # config.py
49
+ FASTPLUGGY_PLUGINS = [
50
+ # other plugins...
51
+ "redis_tools",
52
+ ]
53
+ ```
54
+
55
+ #### Method 3: Programmatically
56
+
57
+ Add the plugin programmatically in your application code:
58
+
59
+ ```python
60
+ from fastapi import FastAPI
61
+ from fastpluggy import FastPluggy
62
+
63
+ app = FastAPI()
64
+ pluggy = FastPluggy(app)
65
+
66
+ # Add the Redis Tools plugin
67
+ pluggy.add_plugin("redis_tools")
68
+ ```
69
+
70
+ For more detailed installation and configuration instructions, see the [Installation Guide](docs/installation.md).
71
+
72
+ ## Configuration
73
+
74
+ Configure Redis Tools through environment variables or directly in your FastPluggy configuration:
75
+
76
+ | Setting | Description | Default |
77
+ |---------|-------------|---------|
78
+ | `REDIS_DSN` | Redis connection string (overrides other connection settings if provided) | `None` |
79
+ | `redis_host` | Redis server hostname | `localhost` |
80
+ | `redis_port` | Redis server port | `6379` |
81
+ | `redis_db` | Default Redis database index | `0` |
82
+ | `use_ssl` | Whether to use SSL for Redis connection | `False` |
83
+ | `redis_password` | Redis server password | `None` |
84
+ | `redis_decode_responses` | Whether to decode Redis responses | `False` |
85
+ | `keys_limit` | Maximum number of keys to display | `100` |
86
+
87
+
88
+ ## Usage
89
+
90
+ ### Web Interface
91
+
92
+ Once installed, access the Redis browser at `/redis_tools/` in your FastPluggy application. The interface allows you to:
93
+
94
+ 1. Select and switch between Redis databases
95
+ 2. Search for keys using patterns (e.g., `user:*`)
96
+ 3. View key details including type, TTL, and size
97
+ 4. Examine and format key values based on their data type
98
+ 5. Delete individual keys
99
+ 6. Flush entire databases
100
+
101
+ ### Programmatic Usage
102
+
103
+ You can also use the Redis Tools connector in your code:
104
+
105
+ ```python
106
+ from redis_tools.redis_connector import RedisConnection
107
+
108
+ # Create a connection
109
+ redis_conn = RedisConnection()
110
+
111
+ # Test connection
112
+ if redis_conn.test_connection():
113
+ # Get all keys matching a pattern
114
+ keys = redis_conn.get_keys("user:*")
115
+
116
+ # Get details for a specific key
117
+ key_details = redis_conn.get_key_details("user:1001")
118
+
119
+ # Switch to another database
120
+ redis_conn.select_db(2)
121
+
122
+ # Delete a key
123
+ redis_conn.delete_key("temporary_key")
124
+ ```
125
+
126
+ ## Development
127
+
128
+ ### Requirements
129
+
130
+ - Python 3.10+
131
+ - FastPluggy
132
+ - Redis
133
+
134
+ ### Testing
135
+
136
+ Run tests with pytest:
137
+
138
+ ```bash
139
+ cd redis_tools
140
+ pip install -r tests/requirements.txt
141
+ pytest
142
+ ```
143
+
144
+ ## License
145
+
146
+ This project is licensed under the MIT License - see the LICENSE file for details.
@@ -0,0 +1,156 @@
1
+ Metadata-Version: 2.4
2
+ Name: fastpluggy-redis
3
+ Version: 0.0.13
4
+ Summary: Redis Tools plugin for Fastpluggy
5
+ Author: FastPluggy Team
6
+ Requires-Python: >=3.10
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: redis
9
+ Requires-Dist: fastpluggy-ui-tools>=0.0.4
10
+
11
+ # Redis Tools for FastPluggy
12
+
13
+ ![Redis Tools](https://img.shields.io/badge/FastPluggy-Redis%20Tools-red)
14
+ ![Version](https://img.shields.io/badge/version-0.0.7-blue)
15
+
16
+ A powerful Redis browser and management plugin for FastPluggy applications.
17
+ This plugin provides a user-friendly interface to browse, search, and manage Redis databases and keys.
18
+
19
+ ## Features
20
+
21
+ - **Redis Browser UI**: Intuitive web interface to browse and manage Redis data
22
+ - **Multi-Database Support**: Switch between Redis databases easily
23
+ - **Key Management**: View, search, and delete Redis keys
24
+ - **Data Type Support**: Full support for all Redis data types (string, list, hash, set, zset)
25
+ - **Pickled Data Handling**: Automatic detection and unpickling of Python pickled data
26
+ - **TTL Management**: View time-to-live for keys
27
+ - **Database Flushing**: Clear entire databases with confirmation
28
+ - **Scheduled Cleanup**: Optional scheduled task to clean expired keys (requires tasks_worker plugin)
29
+
30
+ ## Installation
31
+
32
+ 1. Install the official plugin package:
33
+
34
+ ```bash
35
+ pip install fastpluggy-plugins
36
+ ```
37
+ or
38
+ ```bash
39
+ pip install fastpluggy-plugin-redis
40
+ ```
41
+
42
+ 2. Add the plugin to your FastPluggy application:
43
+
44
+ There are several ways to add the plugin to your FastPluggy application:
45
+
46
+ #### Method 1: Using the Admin Interface
47
+
48
+ 1. Navigate to `/admin/plugins` in your FastPluggy application
49
+ 2. Click on "Install New Plugin"
50
+ 3. Enter "redis_tools" as the plugin name
51
+ 4. Click "Install"
52
+
53
+ #### Method 2: Using the Configuration File
54
+
55
+ Add the plugin to your FastPluggy configuration file:
56
+
57
+ ```python
58
+ # config.py
59
+ FASTPLUGGY_PLUGINS = [
60
+ # other plugins...
61
+ "redis_tools",
62
+ ]
63
+ ```
64
+
65
+ #### Method 3: Programmatically
66
+
67
+ Add the plugin programmatically in your application code:
68
+
69
+ ```python
70
+ from fastapi import FastAPI
71
+ from fastpluggy import FastPluggy
72
+
73
+ app = FastAPI()
74
+ pluggy = FastPluggy(app)
75
+
76
+ # Add the Redis Tools plugin
77
+ pluggy.add_plugin("redis_tools")
78
+ ```
79
+
80
+ For more detailed installation and configuration instructions, see the [Installation Guide](docs/installation.md).
81
+
82
+ ## Configuration
83
+
84
+ Configure Redis Tools through environment variables or directly in your FastPluggy configuration:
85
+
86
+ | Setting | Description | Default |
87
+ |---------|-------------|---------|
88
+ | `REDIS_DSN` | Redis connection string (overrides other connection settings if provided) | `None` |
89
+ | `redis_host` | Redis server hostname | `localhost` |
90
+ | `redis_port` | Redis server port | `6379` |
91
+ | `redis_db` | Default Redis database index | `0` |
92
+ | `use_ssl` | Whether to use SSL for Redis connection | `False` |
93
+ | `redis_password` | Redis server password | `None` |
94
+ | `redis_decode_responses` | Whether to decode Redis responses | `False` |
95
+ | `keys_limit` | Maximum number of keys to display | `100` |
96
+
97
+
98
+ ## Usage
99
+
100
+ ### Web Interface
101
+
102
+ Once installed, access the Redis browser at `/redis_tools/` in your FastPluggy application. The interface allows you to:
103
+
104
+ 1. Select and switch between Redis databases
105
+ 2. Search for keys using patterns (e.g., `user:*`)
106
+ 3. View key details including type, TTL, and size
107
+ 4. Examine and format key values based on their data type
108
+ 5. Delete individual keys
109
+ 6. Flush entire databases
110
+
111
+ ### Programmatic Usage
112
+
113
+ You can also use the Redis Tools connector in your code:
114
+
115
+ ```python
116
+ from redis_tools.redis_connector import RedisConnection
117
+
118
+ # Create a connection
119
+ redis_conn = RedisConnection()
120
+
121
+ # Test connection
122
+ if redis_conn.test_connection():
123
+ # Get all keys matching a pattern
124
+ keys = redis_conn.get_keys("user:*")
125
+
126
+ # Get details for a specific key
127
+ key_details = redis_conn.get_key_details("user:1001")
128
+
129
+ # Switch to another database
130
+ redis_conn.select_db(2)
131
+
132
+ # Delete a key
133
+ redis_conn.delete_key("temporary_key")
134
+ ```
135
+
136
+ ## Development
137
+
138
+ ### Requirements
139
+
140
+ - Python 3.10+
141
+ - FastPluggy
142
+ - Redis
143
+
144
+ ### Testing
145
+
146
+ Run tests with pytest:
147
+
148
+ ```bash
149
+ cd redis_tools
150
+ pip install -r tests/requirements.txt
151
+ pytest
152
+ ```
153
+
154
+ ## License
155
+
156
+ This project is licensed under the MIT License - see the LICENSE file for details.
@@ -0,0 +1,20 @@
1
+ MANIFEST.in
2
+ README.md
3
+ pyproject.toml
4
+ fastpluggy_redis.egg-info/PKG-INFO
5
+ fastpluggy_redis.egg-info/SOURCES.txt
6
+ fastpluggy_redis.egg-info/dependency_links.txt
7
+ fastpluggy_redis.egg-info/entry_points.txt
8
+ fastpluggy_redis.egg-info/requires.txt
9
+ fastpluggy_redis.egg-info/top_level.txt
10
+ src/__init__.py
11
+ src/config.py
12
+ src/plugin.py
13
+ src/redis_connector.py
14
+ src/router.py
15
+ src/schema.py
16
+ src/stats_card_tools.py
17
+ src/templates/browser.html.j2
18
+ src/templates/raw_command.html.j2
19
+ tests/test_plugin.py
20
+ tests/test_redis_connection.py
@@ -0,0 +1,2 @@
1
+ [fastpluggy.plugins]
2
+ redis_tools = fastpluggy_plugin.redis_tools.plugin:RedisToolsPlugin
@@ -0,0 +1,2 @@
1
+ redis
2
+ fastpluggy-ui-tools>=0.0.4
@@ -0,0 +1 @@
1
+ fastpluggy_plugin
@@ -0,0 +1,32 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "fastpluggy-redis"
7
+ version = "0.0.13"
8
+ description = "Redis Tools plugin for Fastpluggy"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ authors = [
12
+ {name = "FastPluggy Team"}
13
+ ]
14
+ dependencies = [
15
+ "redis",
16
+ "fastpluggy-ui-tools>=0.0.4",
17
+ ]
18
+
19
+ [tool.setuptools]
20
+ packages = ["fastpluggy_plugin.redis_tools"]
21
+ package-dir = { "fastpluggy_plugin.redis_tools" = "src" }
22
+ include-package-data = true
23
+
24
+ [tool.setuptools.package-data]
25
+ "fastpluggy_plugin.redis_tools" = ["**/*","templates/**/*.html", "templates/**/*.j2", "static/**/*"]
26
+
27
+ [project.entry-points."fastpluggy.plugins"]
28
+ redis_tools = "fastpluggy_plugin.redis_tools.plugin:RedisToolsPlugin"
29
+
30
+
31
+ [tool.fastpluggy]
32
+ keywords = ['redis']
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ from .plugin import RedisToolsPlugin
@@ -0,0 +1,18 @@
1
+ from typing import Optional
2
+
3
+ from fastpluggy.core.config import BaseDatabaseSettings
4
+
5
+
6
+ class RedisToolsSettings(BaseDatabaseSettings):
7
+ # Redis connection settings
8
+ REDIS_DSN: Optional[str] = None
9
+
10
+ redis_host: str = "localhost"
11
+ redis_port: int = 6379
12
+ redis_db: int = 0
13
+ use_ssl: bool = False
14
+ redis_password: Optional[str] = None
15
+ redis_decode_responses: bool = False
16
+
17
+ # Browser settings
18
+ keys_limit: int = 100
@@ -0,0 +1,33 @@
1
+ # plugin.py
2
+ from typing import Annotated, Any
3
+
4
+ from fastpluggy.core.module_base import FastPluggyBaseModule
5
+ from fastpluggy.core.tools.inspect_tools import InjectDependency
6
+
7
+ from .config import RedisToolsSettings
8
+
9
+ def get_redis_router():
10
+ from .router import redis_router
11
+ return redis_router
12
+
13
+ class RedisToolsPlugin(FastPluggyBaseModule):
14
+ module_name: str = "redis_tools"
15
+ module_version: str = "0.0.11"
16
+
17
+ module_menu_name: str = "Redis Tools"
18
+ module_menu_icon:str = "fa-solid fa-database"
19
+ module_menu_type: str = "main"
20
+
21
+ module_settings: Any = RedisToolsSettings
22
+ module_router: Any = get_redis_router
23
+
24
+ depends_on: dict = {
25
+ "ui_tools": ">=0.0.2",
26
+ }
27
+
28
+ optional_dependencies: dict = {
29
+ "tasks_worker": ">=0.1.0",
30
+ }
31
+
32
+ def on_load_complete(self, fast_pluggy: Annotated["FastPluggy", InjectDependency]) -> None:
33
+ pass