chromadb-admin 1.0.0__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.
@@ -0,0 +1,201 @@
1
+ Metadata-Version: 2.4
2
+ Name: chromadb-admin
3
+ Version: 1.0.0
4
+ Summary: ChromaDB Admin Management System - A web-based admin dashboard for ChromaDB
5
+ Home-page: https://github.com/neetpalsingh/ChromaDB-Admin-managment
6
+ Author: Neetpal Singh
7
+ Author-email: Neetpal Singh <neetpalsingh750@gmail.com>
8
+ Maintainer-email: Neetpal Singh <neetpalsingh750@gmail.com>
9
+ License: MIT
10
+ Project-URL: Homepage, https://github.com/neetpalsingh/ChromaDB-Admin-managment
11
+ Project-URL: Documentation, https://github.com/neetpalsingh/ChromaDB-Admin-managment#readme
12
+ Project-URL: Repository, https://github.com/neetpalsingh/ChromaDB-Admin-managment
13
+ Project-URL: Bug Reports, https://github.com/neetpalsingh/ChromaDB-Admin-managment/issues
14
+ Keywords: chromadb,vector-database,admin,dashboard,management,embeddings,ai,ml
15
+ Classifier: Development Status :: 4 - Beta
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Topic :: Database :: Database Engines/Servers
18
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
+ Classifier: License :: OSI Approved :: MIT License
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.8
22
+ Classifier: Programming Language :: Python :: 3.9
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Requires-Python: >=3.8
27
+ Description-Content-Type: text/markdown
28
+ Requires-Dist: chromadb>=0.4.0
29
+ Requires-Dist: fastapi>=0.100.0
30
+ Requires-Dist: uvicorn[standard]>=0.23.0
31
+ Requires-Dist: pydantic>=2.0.0
32
+ Requires-Dist: python-dotenv>=1.0.0
33
+ Requires-Dist: requests>=2.31.0
34
+ Provides-Extra: dev
35
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
36
+ Requires-Dist: black>=23.0.0; extra == "dev"
37
+ Requires-Dist: flake8>=6.0.0; extra == "dev"
38
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
39
+ Dynamic: author
40
+ Dynamic: home-page
41
+ Dynamic: requires-python
42
+
43
+ # ChromaDB Admin - Python Package
44
+
45
+ A comprehensive admin dashboard and CLI tool for managing ChromaDB vector databases.
46
+
47
+ ## 🚀 Quick Start
48
+
49
+ ### Installation
50
+
51
+ ```bash
52
+ pip install chromadb-admin
53
+ ```
54
+
55
+ ### Usage
56
+
57
+ #### CLI Usage
58
+
59
+ ```bash
60
+ # Start with default settings (port 3434)
61
+ chromadb-admin
62
+
63
+ # Custom port
64
+ chromadb-admin --port 8080
65
+
66
+ # Custom ChromaDB URL
67
+ chromadb-admin --chromadb-url http://localhost:8000
68
+
69
+ # Full customization
70
+ chromadb-admin --port 5000 --host 0.0.0.0 --chromadb-url http://chroma:8000
71
+
72
+ # Enable auto-reload (development)
73
+ chromadb-admin --reload
74
+ ```
75
+
76
+ #### Python API Usage
77
+
78
+ ```python
79
+ from chromadb_admin import start_server
80
+
81
+ # Start with defaults
82
+ start_server()
83
+
84
+ # Custom configuration
85
+ start_server(
86
+ chromadb_url="http://localhost:8000",
87
+ host="0.0.0.0",
88
+ port=3434,
89
+ reload=False
90
+ )
91
+ ```
92
+
93
+ #### Using the Client Library
94
+
95
+ ```python
96
+ from chromadb_admin import ChromaDBAdminClient
97
+
98
+ # Connect to the admin API
99
+ client = ChromaDBAdminClient("http://localhost:3434")
100
+
101
+ # Get server health
102
+ health = client.health()
103
+ print(health)
104
+
105
+ # List collections
106
+ collections = client.list_collections()
107
+ print(collections)
108
+ ```
109
+
110
+ ## 📋 Features
111
+
112
+ - ✅ **Web Dashboard** - Modern React-based UI
113
+ - ✅ **CLI Tool** - Easy command-line interface
114
+ - ✅ **Python API** - Programmatic access
115
+ - ✅ **Collection Management** - Create, view, delete collections
116
+ - ✅ **Document Operations** - Add, query, update, delete documents
117
+ - ✅ **Query Interface** - Advanced similarity search
118
+ - ✅ **Metadata Filtering** - Filter by metadata
119
+ - ✅ **Batch Operations** - Bulk upload and export
120
+ - ✅ **Multi-tenant Support** - Manage multiple databases
121
+
122
+ ## 🔧 Configuration
123
+
124
+ ### Environment Variables
125
+
126
+ Create a `.env` file:
127
+
128
+ ```env
129
+ CHROMADB_URL=http://localhost:8000
130
+ PORT=3434
131
+ HOST=0.0.0.0
132
+ ```
133
+
134
+ ### CLI Arguments
135
+
136
+ ```bash
137
+ chromadb-admin --help
138
+
139
+ Options:
140
+ --chromadb-url TEXT ChromaDB server URL (default: http://localhost:8000)
141
+ --port INTEGER Server port (default: 3434)
142
+ --host TEXT Server host (default: 0.0.0.0)
143
+ --reload Enable auto-reload (development)
144
+ --help Show this message and exit
145
+ ```
146
+
147
+ ## 📦 Installation Methods
148
+
149
+ ### From PyPI (Recommended)
150
+
151
+ ```bash
152
+ pip install chromadb-admin
153
+ ```
154
+
155
+ ### From Source
156
+
157
+ ```bash
158
+ git clone https://github.com/neetpalsingh/ChromaDB-Admin-managment.git
159
+ cd ChromaDB-Admin-managment/python-package
160
+ pip install -e .
161
+ ```
162
+
163
+ ## 🐳 Docker Alternative
164
+
165
+ If you prefer Docker:
166
+
167
+ ```bash
168
+ docker pull neetpalsingh/chromadb-admin
169
+ docker run -p 3434:3434 neetpalsingh/chromadb-admin
170
+ ```
171
+
172
+ ## 📚 Documentation
173
+
174
+ - **GitHub Repository:** https://github.com/neetpalsingh/ChromaDB-Admin-managment
175
+ - **Full Documentation:** See repository README
176
+ - **Issues:** https://github.com/neetpalsingh/ChromaDB-Admin-managment/issues
177
+
178
+ ## 🔗 Related Packages
179
+
180
+ - **NPM Package:** `npm install -g chromadb-admin`
181
+ - **Docker Image:** `neetpalsingh/chromadb-admin`
182
+
183
+ ## 📄 License
184
+
185
+ MIT License - see LICENSE file for details
186
+
187
+ ## 👤 Author
188
+
189
+ **Neetpal Singh**
190
+ - Email: neetpalsingh750@gmail.com
191
+ - GitHub: [@neetpalsingh](https://github.com/neetpalsingh)
192
+
193
+ ## 🤝 Contributing
194
+
195
+ Contributions welcome! Please see CONTRIBUTING.md in the repository.
196
+
197
+ ## ⭐ Support
198
+
199
+ If you find this useful, please star the repository!
200
+
201
+ https://github.com/neetpalsingh/ChromaDB-Admin-managment
@@ -0,0 +1,159 @@
1
+ # ChromaDB Admin - Python Package
2
+
3
+ A comprehensive admin dashboard and CLI tool for managing ChromaDB vector databases.
4
+
5
+ ## 🚀 Quick Start
6
+
7
+ ### Installation
8
+
9
+ ```bash
10
+ pip install chromadb-admin
11
+ ```
12
+
13
+ ### Usage
14
+
15
+ #### CLI Usage
16
+
17
+ ```bash
18
+ # Start with default settings (port 3434)
19
+ chromadb-admin
20
+
21
+ # Custom port
22
+ chromadb-admin --port 8080
23
+
24
+ # Custom ChromaDB URL
25
+ chromadb-admin --chromadb-url http://localhost:8000
26
+
27
+ # Full customization
28
+ chromadb-admin --port 5000 --host 0.0.0.0 --chromadb-url http://chroma:8000
29
+
30
+ # Enable auto-reload (development)
31
+ chromadb-admin --reload
32
+ ```
33
+
34
+ #### Python API Usage
35
+
36
+ ```python
37
+ from chromadb_admin import start_server
38
+
39
+ # Start with defaults
40
+ start_server()
41
+
42
+ # Custom configuration
43
+ start_server(
44
+ chromadb_url="http://localhost:8000",
45
+ host="0.0.0.0",
46
+ port=3434,
47
+ reload=False
48
+ )
49
+ ```
50
+
51
+ #### Using the Client Library
52
+
53
+ ```python
54
+ from chromadb_admin import ChromaDBAdminClient
55
+
56
+ # Connect to the admin API
57
+ client = ChromaDBAdminClient("http://localhost:3434")
58
+
59
+ # Get server health
60
+ health = client.health()
61
+ print(health)
62
+
63
+ # List collections
64
+ collections = client.list_collections()
65
+ print(collections)
66
+ ```
67
+
68
+ ## 📋 Features
69
+
70
+ - ✅ **Web Dashboard** - Modern React-based UI
71
+ - ✅ **CLI Tool** - Easy command-line interface
72
+ - ✅ **Python API** - Programmatic access
73
+ - ✅ **Collection Management** - Create, view, delete collections
74
+ - ✅ **Document Operations** - Add, query, update, delete documents
75
+ - ✅ **Query Interface** - Advanced similarity search
76
+ - ✅ **Metadata Filtering** - Filter by metadata
77
+ - ✅ **Batch Operations** - Bulk upload and export
78
+ - ✅ **Multi-tenant Support** - Manage multiple databases
79
+
80
+ ## 🔧 Configuration
81
+
82
+ ### Environment Variables
83
+
84
+ Create a `.env` file:
85
+
86
+ ```env
87
+ CHROMADB_URL=http://localhost:8000
88
+ PORT=3434
89
+ HOST=0.0.0.0
90
+ ```
91
+
92
+ ### CLI Arguments
93
+
94
+ ```bash
95
+ chromadb-admin --help
96
+
97
+ Options:
98
+ --chromadb-url TEXT ChromaDB server URL (default: http://localhost:8000)
99
+ --port INTEGER Server port (default: 3434)
100
+ --host TEXT Server host (default: 0.0.0.0)
101
+ --reload Enable auto-reload (development)
102
+ --help Show this message and exit
103
+ ```
104
+
105
+ ## 📦 Installation Methods
106
+
107
+ ### From PyPI (Recommended)
108
+
109
+ ```bash
110
+ pip install chromadb-admin
111
+ ```
112
+
113
+ ### From Source
114
+
115
+ ```bash
116
+ git clone https://github.com/neetpalsingh/ChromaDB-Admin-managment.git
117
+ cd ChromaDB-Admin-managment/python-package
118
+ pip install -e .
119
+ ```
120
+
121
+ ## 🐳 Docker Alternative
122
+
123
+ If you prefer Docker:
124
+
125
+ ```bash
126
+ docker pull neetpalsingh/chromadb-admin
127
+ docker run -p 3434:3434 neetpalsingh/chromadb-admin
128
+ ```
129
+
130
+ ## 📚 Documentation
131
+
132
+ - **GitHub Repository:** https://github.com/neetpalsingh/ChromaDB-Admin-managment
133
+ - **Full Documentation:** See repository README
134
+ - **Issues:** https://github.com/neetpalsingh/ChromaDB-Admin-managment/issues
135
+
136
+ ## 🔗 Related Packages
137
+
138
+ - **NPM Package:** `npm install -g chromadb-admin`
139
+ - **Docker Image:** `neetpalsingh/chromadb-admin`
140
+
141
+ ## 📄 License
142
+
143
+ MIT License - see LICENSE file for details
144
+
145
+ ## 👤 Author
146
+
147
+ **Neetpal Singh**
148
+ - Email: neetpalsingh750@gmail.com
149
+ - GitHub: [@neetpalsingh](https://github.com/neetpalsingh)
150
+
151
+ ## 🤝 Contributing
152
+
153
+ Contributions welcome! Please see CONTRIBUTING.md in the repository.
154
+
155
+ ## ⭐ Support
156
+
157
+ If you find this useful, please star the repository!
158
+
159
+ https://github.com/neetpalsingh/ChromaDB-Admin-managment
@@ -0,0 +1,70 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "chromadb-admin"
7
+ version = "1.0.0"
8
+ description = "ChromaDB Admin Management System - A web-based admin dashboard for ChromaDB"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = {text = "MIT"}
12
+ keywords = ["chromadb", "vector-database", "admin", "dashboard", "management", "embeddings", "ai", "ml"]
13
+ authors = [
14
+ {name = "Neetpal Singh", email = "neetpalsingh750@gmail.com"}
15
+ ]
16
+ maintainers = [
17
+ {name = "Neetpal Singh", email = "neetpalsingh750@gmail.com"}
18
+ ]
19
+ classifiers = [
20
+ "Development Status :: 4 - Beta",
21
+ "Intended Audience :: Developers",
22
+ "Topic :: Database :: Database Engines/Servers",
23
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
24
+ "License :: OSI Approved :: MIT License",
25
+ "Programming Language :: Python :: 3",
26
+ "Programming Language :: Python :: 3.8",
27
+ "Programming Language :: Python :: 3.9",
28
+ "Programming Language :: Python :: 3.10",
29
+ "Programming Language :: Python :: 3.11",
30
+ "Programming Language :: Python :: 3.12",
31
+ ]
32
+
33
+ dependencies = [
34
+ "chromadb>=0.4.0",
35
+ "fastapi>=0.100.0",
36
+ "uvicorn[standard]>=0.23.0",
37
+ "pydantic>=2.0.0",
38
+ "python-dotenv>=1.0.0",
39
+ "requests>=2.31.0",
40
+ ]
41
+
42
+ [project.optional-dependencies]
43
+ dev = [
44
+ "pytest>=7.0.0",
45
+ "black>=23.0.0",
46
+ "flake8>=6.0.0",
47
+ "mypy>=1.0.0",
48
+ ]
49
+
50
+ [project.urls]
51
+ Homepage = "https://github.com/neetpalsingh/ChromaDB-Admin-managment"
52
+ Documentation = "https://github.com/neetpalsingh/ChromaDB-Admin-managment#readme"
53
+ Repository = "https://github.com/neetpalsingh/ChromaDB-Admin-managment"
54
+ "Bug Reports" = "https://github.com/neetpalsingh/ChromaDB-Admin-managment/issues"
55
+
56
+ [project.scripts]
57
+ chromadb-admin = "chromadb_admin.cli:main"
58
+
59
+ [tool.setuptools.packages.find]
60
+ where = ["src"]
61
+
62
+ [tool.black]
63
+ line-length = 100
64
+ target-version = ['py38', 'py39', 'py310', 'py311']
65
+
66
+ [tool.mypy]
67
+ python_version = "3.8"
68
+ warn_return_any = true
69
+ warn_unused_configs = true
70
+ disallow_untyped_defs = true
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,74 @@
1
+ """
2
+ ChromaDB Admin Management System (CAMS) - Python Package
3
+ Setup configuration for PyPI distribution
4
+ """
5
+
6
+ from setuptools import setup, find_packages
7
+ from pathlib import Path
8
+
9
+ # Read the README file
10
+ this_directory = Path(__file__).parent
11
+ long_description = (this_directory / "README.md").read_text(encoding='utf-8')
12
+
13
+ setup(
14
+ name='chromadb-admin',
15
+ version='1.0.0',
16
+ author='Neetpal Singh',
17
+ author_email='neetpalsingh750@gmail.com',
18
+ description='ChromaDB Admin Management System - A web-based admin dashboard for ChromaDB vector databases',
19
+ long_description=long_description,
20
+ long_description_content_type='text/markdown',
21
+ url='https://github.com/neetpalsingh/ChromaDB-Admin-managment',
22
+ project_urls={
23
+ 'Bug Reports': 'https://github.com/neetpalsingh/ChromaDB-Admin-managment/issues',
24
+ 'Source': 'https://github.com/neetpalsingh/ChromaDB-Admin-managment',
25
+ 'Documentation': 'https://github.com/neetpalsingh/ChromaDB-Admin-managment#readme',
26
+ },
27
+ packages=find_packages(where='src'),
28
+ package_dir={'': 'src'},
29
+ classifiers=[
30
+ 'Development Status :: 4 - Beta',
31
+ 'Intended Audience :: Developers',
32
+ 'Topic :: Database :: Database Engines/Servers',
33
+ 'Topic :: Scientific/Engineering :: Artificial Intelligence',
34
+ 'License :: OSI Approved :: MIT License',
35
+ 'Programming Language :: Python :: 3',
36
+ 'Programming Language :: Python :: 3.8',
37
+ 'Programming Language :: Python :: 3.9',
38
+ 'Programming Language :: Python :: 3.10',
39
+ 'Programming Language :: Python :: 3.11',
40
+ 'Programming Language :: Python :: 3.12',
41
+ 'Operating System :: OS Independent',
42
+ ],
43
+ keywords='chromadb vector-database admin dashboard management ui embeddings ai ml',
44
+ python_requires='>=3.8',
45
+ install_requires=[
46
+ 'chromadb>=0.4.0',
47
+ 'fastapi>=0.100.0',
48
+ 'uvicorn>=0.23.0',
49
+ 'pydantic>=2.0.0',
50
+ 'python-dotenv>=1.0.0',
51
+ 'requests>=2.31.0',
52
+ ],
53
+ extras_require={
54
+ 'dev': [
55
+ 'pytest>=7.0.0',
56
+ 'black>=23.0.0',
57
+ 'flake8>=6.0.0',
58
+ 'mypy>=1.0.0',
59
+ ],
60
+ },
61
+ entry_points={
62
+ 'console_scripts': [
63
+ 'chromadb-admin=chromadb_admin.cli:main',
64
+ ],
65
+ },
66
+ include_package_data=True,
67
+ package_data={
68
+ 'chromadb_admin': [
69
+ 'static/*',
70
+ 'templates/*',
71
+ ],
72
+ },
73
+ zip_safe=False,
74
+ )
@@ -0,0 +1,13 @@
1
+ """
2
+ ChromaDB Admin Management System (CAMS)
3
+ A modern web-based admin dashboard for ChromaDB vector databases
4
+ """
5
+
6
+ __version__ = "1.0.0"
7
+ __author__ = "Neetpal Singh"
8
+ __email__ = "neetpal@ascentbusiness.co.in"
9
+
10
+ from .server import start_server
11
+ from .client import ChromaDBAdminClient
12
+
13
+ __all__ = ["start_server", "ChromaDBAdminClient", "__version__"]
@@ -0,0 +1,109 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ ChromaDB Admin CLI
4
+ Command-line interface for starting the admin dashboard
5
+ """
6
+
7
+ import argparse
8
+ import sys
9
+ import os
10
+ from pathlib import Path
11
+ from .server import start_server
12
+
13
+ # ASCII Art Banner
14
+ BANNER = """
15
+ ╔═══════════════════════════════════════════════════════════╗
16
+ ║ ║
17
+ ║ ██████╗██╗ ██╗██████╗ ██████╗ ██████╗ ███╗ ███╗ ║
18
+ ║ ██╔════╝██║ ██║██╔══██╗██╔═══██╗██╔══██╗████╗ ████║ ║
19
+ ║ ██║ ███████║██████╔╝██║ ██║██║ ██║██╔████╔██║ ║
20
+ ║ ██║ ██╔══██║██╔══██╗██║ ██║██║ ██║██║╚██╔╝██║ ║
21
+ ║ ╚██████╗██║ ██║██║ ██║╚██████╔╝██████╔╝██║ ╚═╝ ██║ ║
22
+ ║ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ║
23
+ ║ ║
24
+ ║ Admin Management System for ChromaDB ║
25
+ ║ Version 1.0.0 ║
26
+ ║ ║
27
+ ╚═══════════════════════════════════════════════════════════╝
28
+ """
29
+
30
+
31
+ def main():
32
+ """Main CLI entry point"""
33
+ print(BANNER)
34
+
35
+ parser = argparse.ArgumentParser(
36
+ description='ChromaDB Admin Management System',
37
+ formatter_class=argparse.RawDescriptionHelpFormatter,
38
+ epilog="""
39
+ Examples:
40
+ chromadb-admin # Start with defaults (port 3434)
41
+ chromadb-admin --port 8080 # Start on port 8080
42
+ chromadb-admin --chromadb-url http://localhost:8000 # Custom ChromaDB URL
43
+ chromadb-admin --port 5000 --host 0.0.0.0 # Custom port and host
44
+ chromadb-admin --chromadb-url http://chroma:8000 --port 3434
45
+
46
+ Environment Variables:
47
+ CHROMADB_URL ChromaDB server URL (default: http://localhost:8000)
48
+ PORT Server port (default: 3434)
49
+ HOST Server host (default: 0.0.0.0)
50
+ """
51
+ )
52
+
53
+ parser.add_argument(
54
+ '--chromadb-url',
55
+ type=str,
56
+ default=os.getenv('CHROMADB_URL', 'http://localhost:8000'),
57
+ help='ChromaDB server URL (default: http://localhost:8000)'
58
+ )
59
+
60
+ parser.add_argument(
61
+ '--port',
62
+ type=int,
63
+ default=int(os.getenv('PORT', 3434)),
64
+ help='Server port (default: 3434)'
65
+ )
66
+
67
+ parser.add_argument(
68
+ '--host',
69
+ type=str,
70
+ default=os.getenv('HOST', '0.0.0.0'),
71
+ help='Server host (default: 0.0.0.0)'
72
+ )
73
+
74
+ parser.add_argument(
75
+ '--reload',
76
+ action='store_true',
77
+ help='Enable auto-reload for development'
78
+ )
79
+
80
+ parser.add_argument(
81
+ '--version',
82
+ action='version',
83
+ version='ChromaDB Admin v1.0.0'
84
+ )
85
+
86
+ args = parser.parse_args()
87
+
88
+ print(f"🚀 Starting ChromaDB Admin Dashboard...")
89
+ print(f"📡 ChromaDB URL: {args.chromadb_url}")
90
+ print(f"🌐 Server: http://{args.host}:{args.port}")
91
+ print(f"")
92
+
93
+ try:
94
+ start_server(
95
+ chromadb_url=args.chromadb_url,
96
+ host=args.host,
97
+ port=args.port,
98
+ reload=args.reload
99
+ )
100
+ except KeyboardInterrupt:
101
+ print("\n👋 Shutting down ChromaDB Admin...")
102
+ sys.exit(0)
103
+ except Exception as e:
104
+ print(f"\n❌ Error: {e}")
105
+ sys.exit(1)
106
+
107
+
108
+ if __name__ == '__main__':
109
+ main()
@@ -0,0 +1,147 @@
1
+ """
2
+ ChromaDB Admin Client
3
+ Python client for interacting with ChromaDB Admin API
4
+ """
5
+
6
+ from typing import Optional, Dict, Any, List
7
+ import requests
8
+
9
+
10
+ class ChromaDBAdminClient:
11
+ """Client for ChromaDB Admin API"""
12
+
13
+ def __init__(self, base_url: str = "http://localhost:3434"):
14
+ """
15
+ Initialize ChromaDB Admin Client
16
+
17
+ Args:
18
+ base_url: Base URL of the ChromaDB Admin server
19
+ """
20
+ self.base_url = base_url.rstrip('/')
21
+ self.session = requests.Session()
22
+
23
+ def _request(
24
+ self,
25
+ method: str,
26
+ endpoint: str,
27
+ **kwargs
28
+ ) -> requests.Response:
29
+ """Make HTTP request to admin API"""
30
+ url = f"{self.base_url}{endpoint}"
31
+ response = self.session.request(method, url, **kwargs)
32
+ response.raise_for_status()
33
+ return response
34
+
35
+ def health_check(self) -> Dict[str, Any]:
36
+ """Check ChromaDB health"""
37
+ response = self._request("GET", "/api/v1/healthcheck")
38
+ return response.json()
39
+
40
+ def list_databases(self, tenant: str = "default_tenant") -> List[str]:
41
+ """List all databases"""
42
+ response = self._request(
43
+ "GET",
44
+ f"/api/v1/tenants/{tenant}/databases"
45
+ )
46
+ return response.json()
47
+
48
+ def list_collections(
49
+ self,
50
+ tenant: str = "default_tenant",
51
+ database: str = "default_database"
52
+ ) -> List[Dict[str, Any]]:
53
+ """List all collections in a database"""
54
+ response = self._request(
55
+ "GET",
56
+ f"/api/v1/collections",
57
+ params={"tenant": tenant, "database": database}
58
+ )
59
+ return response.json()
60
+
61
+ def get_collection(
62
+ self,
63
+ collection_id: str,
64
+ tenant: str = "default_tenant",
65
+ database: str = "default_database"
66
+ ) -> Dict[str, Any]:
67
+ """Get collection details"""
68
+ response = self._request(
69
+ "GET",
70
+ f"/api/v1/collections/{collection_id}",
71
+ params={"tenant": tenant, "database": database}
72
+ )
73
+ return response.json()
74
+
75
+ def query_collection(
76
+ self,
77
+ collection_id: str,
78
+ query_embeddings: List[List[float]],
79
+ n_results: int = 10,
80
+ tenant: str = "default_tenant",
81
+ database: str = "default_database",
82
+ **kwargs
83
+ ) -> Dict[str, Any]:
84
+ """Query a collection"""
85
+ response = self._request(
86
+ "POST",
87
+ f"/api/v1/collections/{collection_id}/query",
88
+ json={
89
+ "query_embeddings": query_embeddings,
90
+ "n_results": n_results,
91
+ **kwargs
92
+ },
93
+ params={"tenant": tenant, "database": database}
94
+ )
95
+ return response.json()
96
+
97
+ def add_to_collection(
98
+ self,
99
+ collection_id: str,
100
+ embeddings: List[List[float]],
101
+ documents: Optional[List[str]] = None,
102
+ metadatas: Optional[List[Dict[str, Any]]] = None,
103
+ ids: Optional[List[str]] = None,
104
+ tenant: str = "default_tenant",
105
+ database: str = "default_database"
106
+ ) -> Dict[str, Any]:
107
+ """Add items to a collection"""
108
+ response = self._request(
109
+ "POST",
110
+ f"/api/v1/collections/{collection_id}/add",
111
+ json={
112
+ "embeddings": embeddings,
113
+ "documents": documents,
114
+ "metadatas": metadatas,
115
+ "ids": ids
116
+ },
117
+ params={"tenant": tenant, "database": database}
118
+ )
119
+ return response.json()
120
+
121
+ def delete_from_collection(
122
+ self,
123
+ collection_id: str,
124
+ ids: List[str],
125
+ tenant: str = "default_tenant",
126
+ database: str = "default_database"
127
+ ) -> Dict[str, Any]:
128
+ """Delete items from a collection"""
129
+ response = self._request(
130
+ "POST",
131
+ f"/api/v1/collections/{collection_id}/delete",
132
+ json={"ids": ids},
133
+ params={"tenant": tenant, "database": database}
134
+ )
135
+ return response.json()
136
+
137
+ def close(self):
138
+ """Close the client session"""
139
+ self.session.close()
140
+
141
+ def __enter__(self):
142
+ """Context manager entry"""
143
+ return self
144
+
145
+ def __exit__(self, *args):
146
+ """Context manager exit"""
147
+ self.close()
@@ -0,0 +1,116 @@
1
+ """
2
+ ChromaDB Admin Server
3
+ FastAPI server that serves the admin dashboard and proxies ChromaDB API
4
+ """
5
+
6
+ import os
7
+ import subprocess
8
+ import sys
9
+ from pathlib import Path
10
+ from typing import Optional
11
+ import uvicorn
12
+ from fastapi import FastAPI, Request
13
+ from fastapi.responses import FileResponse, HTMLResponse, Response
14
+ from fastapi.staticfiles import StaticFiles
15
+ from fastapi.middleware.cors import CORSMiddleware
16
+ import httpx
17
+
18
+
19
+ def get_static_dir() -> Path:
20
+ """Get the static files directory"""
21
+ # When installed, static files are in the package directory
22
+ package_dir = Path(__file__).parent
23
+ static_dir = package_dir / "static"
24
+
25
+ if static_dir.exists():
26
+ return static_dir
27
+
28
+ # Fallback: try to find build directory from npm package
29
+ npm_build = Path.cwd() / "build"
30
+ if npm_build.exists():
31
+ return npm_build
32
+
33
+ raise RuntimeError("Static files not found. Please build the frontend first.")
34
+
35
+
36
+ def create_app(chromadb_url: str = "http://localhost:8000") -> FastAPI:
37
+ """Create FastAPI application"""
38
+ app = FastAPI(
39
+ title="ChromaDB Admin",
40
+ description="Admin dashboard for ChromaDB",
41
+ version="1.0.0"
42
+ )
43
+
44
+ # CORS middleware
45
+ app.add_middleware(
46
+ CORSMiddleware,
47
+ allow_origins=["*"],
48
+ allow_credentials=True,
49
+ allow_methods=["*"],
50
+ allow_headers=["*"],
51
+ )
52
+
53
+ # Proxy to ChromaDB
54
+ @app.api_route("/api/{path:path}", methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"])
55
+ async def proxy_chromadb(path: str, request: Request):
56
+ """Proxy requests to ChromaDB"""
57
+ url = f"{chromadb_url}/api/{path}"
58
+
59
+ # Get request body
60
+ body = await request.body()
61
+
62
+ # Forward request to ChromaDB
63
+ async with httpx.AsyncClient() as client:
64
+ response = await client.request(
65
+ method=request.method,
66
+ url=url,
67
+ headers=dict(request.headers),
68
+ content=body,
69
+ timeout=300.0
70
+ )
71
+
72
+ return Response(
73
+ content=response.content,
74
+ status_code=response.status_code,
75
+ headers=dict(response.headers)
76
+ )
77
+
78
+ # Serve static files
79
+ try:
80
+ static_dir = get_static_dir()
81
+ app.mount("/static", StaticFiles(directory=static_dir), name="static")
82
+
83
+ @app.get("/")
84
+ async def serve_spa():
85
+ """Serve the React SPA"""
86
+ index_file = static_dir / "index.html"
87
+ if index_file.exists():
88
+ return FileResponse(index_file)
89
+ return HTMLResponse("<h1>ChromaDB Admin - Static files not found</h1>")
90
+ except RuntimeError as e:
91
+ print(f"⚠️ Warning: {e}")
92
+ print("📝 The admin UI will not be available. API proxy is still functional.")
93
+
94
+ return app
95
+
96
+
97
+ def start_server(
98
+ chromadb_url: str = "http://localhost:8000",
99
+ host: str = "0.0.0.0",
100
+ port: int = 3434,
101
+ reload: bool = False
102
+ ):
103
+ """Start the ChromaDB Admin server"""
104
+ app = create_app(chromadb_url=chromadb_url)
105
+
106
+ uvicorn.run(
107
+ app,
108
+ host=host,
109
+ port=port,
110
+ reload=reload,
111
+ log_level="info"
112
+ )
113
+
114
+
115
+ if __name__ == "__main__":
116
+ start_server()
@@ -0,0 +1,201 @@
1
+ Metadata-Version: 2.4
2
+ Name: chromadb-admin
3
+ Version: 1.0.0
4
+ Summary: ChromaDB Admin Management System - A web-based admin dashboard for ChromaDB
5
+ Home-page: https://github.com/neetpalsingh/ChromaDB-Admin-managment
6
+ Author: Neetpal Singh
7
+ Author-email: Neetpal Singh <neetpalsingh750@gmail.com>
8
+ Maintainer-email: Neetpal Singh <neetpalsingh750@gmail.com>
9
+ License: MIT
10
+ Project-URL: Homepage, https://github.com/neetpalsingh/ChromaDB-Admin-managment
11
+ Project-URL: Documentation, https://github.com/neetpalsingh/ChromaDB-Admin-managment#readme
12
+ Project-URL: Repository, https://github.com/neetpalsingh/ChromaDB-Admin-managment
13
+ Project-URL: Bug Reports, https://github.com/neetpalsingh/ChromaDB-Admin-managment/issues
14
+ Keywords: chromadb,vector-database,admin,dashboard,management,embeddings,ai,ml
15
+ Classifier: Development Status :: 4 - Beta
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Topic :: Database :: Database Engines/Servers
18
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
+ Classifier: License :: OSI Approved :: MIT License
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.8
22
+ Classifier: Programming Language :: Python :: 3.9
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Requires-Python: >=3.8
27
+ Description-Content-Type: text/markdown
28
+ Requires-Dist: chromadb>=0.4.0
29
+ Requires-Dist: fastapi>=0.100.0
30
+ Requires-Dist: uvicorn[standard]>=0.23.0
31
+ Requires-Dist: pydantic>=2.0.0
32
+ Requires-Dist: python-dotenv>=1.0.0
33
+ Requires-Dist: requests>=2.31.0
34
+ Provides-Extra: dev
35
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
36
+ Requires-Dist: black>=23.0.0; extra == "dev"
37
+ Requires-Dist: flake8>=6.0.0; extra == "dev"
38
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
39
+ Dynamic: author
40
+ Dynamic: home-page
41
+ Dynamic: requires-python
42
+
43
+ # ChromaDB Admin - Python Package
44
+
45
+ A comprehensive admin dashboard and CLI tool for managing ChromaDB vector databases.
46
+
47
+ ## 🚀 Quick Start
48
+
49
+ ### Installation
50
+
51
+ ```bash
52
+ pip install chromadb-admin
53
+ ```
54
+
55
+ ### Usage
56
+
57
+ #### CLI Usage
58
+
59
+ ```bash
60
+ # Start with default settings (port 3434)
61
+ chromadb-admin
62
+
63
+ # Custom port
64
+ chromadb-admin --port 8080
65
+
66
+ # Custom ChromaDB URL
67
+ chromadb-admin --chromadb-url http://localhost:8000
68
+
69
+ # Full customization
70
+ chromadb-admin --port 5000 --host 0.0.0.0 --chromadb-url http://chroma:8000
71
+
72
+ # Enable auto-reload (development)
73
+ chromadb-admin --reload
74
+ ```
75
+
76
+ #### Python API Usage
77
+
78
+ ```python
79
+ from chromadb_admin import start_server
80
+
81
+ # Start with defaults
82
+ start_server()
83
+
84
+ # Custom configuration
85
+ start_server(
86
+ chromadb_url="http://localhost:8000",
87
+ host="0.0.0.0",
88
+ port=3434,
89
+ reload=False
90
+ )
91
+ ```
92
+
93
+ #### Using the Client Library
94
+
95
+ ```python
96
+ from chromadb_admin import ChromaDBAdminClient
97
+
98
+ # Connect to the admin API
99
+ client = ChromaDBAdminClient("http://localhost:3434")
100
+
101
+ # Get server health
102
+ health = client.health()
103
+ print(health)
104
+
105
+ # List collections
106
+ collections = client.list_collections()
107
+ print(collections)
108
+ ```
109
+
110
+ ## 📋 Features
111
+
112
+ - ✅ **Web Dashboard** - Modern React-based UI
113
+ - ✅ **CLI Tool** - Easy command-line interface
114
+ - ✅ **Python API** - Programmatic access
115
+ - ✅ **Collection Management** - Create, view, delete collections
116
+ - ✅ **Document Operations** - Add, query, update, delete documents
117
+ - ✅ **Query Interface** - Advanced similarity search
118
+ - ✅ **Metadata Filtering** - Filter by metadata
119
+ - ✅ **Batch Operations** - Bulk upload and export
120
+ - ✅ **Multi-tenant Support** - Manage multiple databases
121
+
122
+ ## 🔧 Configuration
123
+
124
+ ### Environment Variables
125
+
126
+ Create a `.env` file:
127
+
128
+ ```env
129
+ CHROMADB_URL=http://localhost:8000
130
+ PORT=3434
131
+ HOST=0.0.0.0
132
+ ```
133
+
134
+ ### CLI Arguments
135
+
136
+ ```bash
137
+ chromadb-admin --help
138
+
139
+ Options:
140
+ --chromadb-url TEXT ChromaDB server URL (default: http://localhost:8000)
141
+ --port INTEGER Server port (default: 3434)
142
+ --host TEXT Server host (default: 0.0.0.0)
143
+ --reload Enable auto-reload (development)
144
+ --help Show this message and exit
145
+ ```
146
+
147
+ ## 📦 Installation Methods
148
+
149
+ ### From PyPI (Recommended)
150
+
151
+ ```bash
152
+ pip install chromadb-admin
153
+ ```
154
+
155
+ ### From Source
156
+
157
+ ```bash
158
+ git clone https://github.com/neetpalsingh/ChromaDB-Admin-managment.git
159
+ cd ChromaDB-Admin-managment/python-package
160
+ pip install -e .
161
+ ```
162
+
163
+ ## 🐳 Docker Alternative
164
+
165
+ If you prefer Docker:
166
+
167
+ ```bash
168
+ docker pull neetpalsingh/chromadb-admin
169
+ docker run -p 3434:3434 neetpalsingh/chromadb-admin
170
+ ```
171
+
172
+ ## 📚 Documentation
173
+
174
+ - **GitHub Repository:** https://github.com/neetpalsingh/ChromaDB-Admin-managment
175
+ - **Full Documentation:** See repository README
176
+ - **Issues:** https://github.com/neetpalsingh/ChromaDB-Admin-managment/issues
177
+
178
+ ## 🔗 Related Packages
179
+
180
+ - **NPM Package:** `npm install -g chromadb-admin`
181
+ - **Docker Image:** `neetpalsingh/chromadb-admin`
182
+
183
+ ## 📄 License
184
+
185
+ MIT License - see LICENSE file for details
186
+
187
+ ## 👤 Author
188
+
189
+ **Neetpal Singh**
190
+ - Email: neetpalsingh750@gmail.com
191
+ - GitHub: [@neetpalsingh](https://github.com/neetpalsingh)
192
+
193
+ ## 🤝 Contributing
194
+
195
+ Contributions welcome! Please see CONTRIBUTING.md in the repository.
196
+
197
+ ## ⭐ Support
198
+
199
+ If you find this useful, please star the repository!
200
+
201
+ https://github.com/neetpalsingh/ChromaDB-Admin-managment
@@ -0,0 +1,14 @@
1
+ README.md
2
+ pyproject.toml
3
+ setup.py
4
+ src/chromadb_admin/__init__.py
5
+ src/chromadb_admin/cli.py
6
+ src/chromadb_admin/client.py
7
+ src/chromadb_admin/server.py
8
+ src/chromadb_admin.egg-info/PKG-INFO
9
+ src/chromadb_admin.egg-info/SOURCES.txt
10
+ src/chromadb_admin.egg-info/dependency_links.txt
11
+ src/chromadb_admin.egg-info/entry_points.txt
12
+ src/chromadb_admin.egg-info/not-zip-safe
13
+ src/chromadb_admin.egg-info/requires.txt
14
+ src/chromadb_admin.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ chromadb-admin = chromadb_admin.cli:main
@@ -0,0 +1,12 @@
1
+ chromadb>=0.4.0
2
+ fastapi>=0.100.0
3
+ uvicorn[standard]>=0.23.0
4
+ pydantic>=2.0.0
5
+ python-dotenv>=1.0.0
6
+ requests>=2.31.0
7
+
8
+ [dev]
9
+ pytest>=7.0.0
10
+ black>=23.0.0
11
+ flake8>=6.0.0
12
+ mypy>=1.0.0
@@ -0,0 +1 @@
1
+ chromadb_admin