sqlalchemy-studio 0.1.7__tar.gz → 0.1.8__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.
Files changed (25) hide show
  1. sqlalchemy_studio-0.1.8/PKG-INFO +97 -0
  2. sqlalchemy_studio-0.1.8/README.md +74 -0
  3. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/pyproject.toml +1 -1
  4. sqlalchemy_studio-0.1.8/sqlalchemy_studio.egg-info/PKG-INFO +97 -0
  5. sqlalchemy_studio-0.1.7/PKG-INFO +0 -105
  6. sqlalchemy_studio-0.1.7/README.md +0 -82
  7. sqlalchemy_studio-0.1.7/sqlalchemy_studio.egg-info/PKG-INFO +0 -105
  8. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/setup.cfg +0 -0
  9. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/sqlalchemy_studio/Studio.py +0 -0
  10. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/sqlalchemy_studio/__init__.py +0 -0
  11. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/sqlalchemy_studio/backend.py +0 -0
  12. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/sqlalchemy_studio/static/assets/index-0qQM-QLq.js +0 -0
  13. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/sqlalchemy_studio/static/assets/index-B8xFyRBc.css +0 -0
  14. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/sqlalchemy_studio/static/assets/routes-BJJUUmei.js +0 -0
  15. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/sqlalchemy_studio/static/assets/tables._tableName-C7FBzk6i.js +0 -0
  16. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/sqlalchemy_studio/static/favicon.ico +0 -0
  17. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/sqlalchemy_studio/static/index.html +0 -0
  18. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/sqlalchemy_studio/static/logo192.png +0 -0
  19. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/sqlalchemy_studio/static/logo512.png +0 -0
  20. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/sqlalchemy_studio/static/manifest.json +0 -0
  21. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/sqlalchemy_studio/static/robots.txt +0 -0
  22. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/sqlalchemy_studio.egg-info/SOURCES.txt +0 -0
  23. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/sqlalchemy_studio.egg-info/dependency_links.txt +0 -0
  24. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/sqlalchemy_studio.egg-info/requires.txt +0 -0
  25. {sqlalchemy_studio-0.1.7 → sqlalchemy_studio-0.1.8}/sqlalchemy_studio.egg-info/top_level.txt +0 -0
@@ -0,0 +1,97 @@
1
+ Metadata-Version: 2.4
2
+ Name: sqlalchemy-studio
3
+ Version: 0.1.8
4
+ Summary: FastAPI studio for inspecting SQLAlchemy databases
5
+ Author-email: Xursand Qarlibayev <coderxuz2009@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/coderxuz/sqlalchemy-studio
8
+ Project-URL: Source, https://github.com/coderxuz/sqlalchemy-studio
9
+ Keywords: sqlalchemy,database,inspector,studio
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Requires-Python: >=3.11
17
+ Description-Content-Type: text/markdown
18
+ Requires-Dist: build>=1.5.0
19
+ Requires-Dist: fastapi>=0.136.3
20
+ Requires-Dist: sqlalchemy>=2.0.50
21
+ Requires-Dist: twine>=6.2.0
22
+ Requires-Dist: uvicorn>=0.48.0
23
+
24
+ # sqlalchemy-studio
25
+
26
+ FastAPI studio for inspecting and querying SQLAlchemy databases.
27
+
28
+ ## Installation
29
+
30
+ Install from PyPI:
31
+
32
+ ```bash
33
+ pip install sqlalchemy-studio
34
+ ```
35
+
36
+ Or install the latest version from GitHub:
37
+
38
+ ```bash
39
+ pip install --upgrade git+https://github.com/coderxuz/sqlalchemy-studio.git@main#subdirectory=sqlalchemy-studio-backend
40
+ ```
41
+
42
+ ## Usage
43
+
44
+ Create a normal SQLAlchemy engine and declarative base, then pass them to `Studio`.
45
+
46
+ ```python
47
+ from sqlalchemy import Integer, String, create_engine
48
+ from sqlalchemy.orm import DeclarativeBase, Mapped, Session, mapped_column
49
+
50
+ from sqlalchemy_studio import Studio
51
+
52
+
53
+ class Base(DeclarativeBase):
54
+ pass
55
+
56
+
57
+ class User(Base):
58
+ __tablename__ = "users"
59
+
60
+ id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
61
+ username: Mapped[str] = mapped_column(String(50), nullable=False)
62
+ email: Mapped[str] = mapped_column(String(120), nullable=False)
63
+
64
+
65
+ engine = create_engine("sqlite:///app.db")
66
+
67
+
68
+ def seed_data() -> None:
69
+ Base.metadata.create_all(engine)
70
+
71
+ with Session(engine) as session:
72
+ if session.query(User).count() == 0:
73
+ session.add_all(
74
+ [
75
+ User(username="john", email="john@example.com"),
76
+ User(username="alice", email="alice@example.com"),
77
+ ]
78
+ )
79
+ session.commit()
80
+
81
+
82
+ if __name__ == "__main__":
83
+ seed_data()
84
+ Studio(engine=engine, base=Base).run(port=7000)
85
+ ```
86
+
87
+ Run the script:
88
+
89
+ ```bash
90
+ python app.py
91
+ ```
92
+
93
+ Open `http://localhost:7000` in your browser.
94
+
95
+
96
+
97
+ ![Example dashboard](image.png)
@@ -0,0 +1,74 @@
1
+ # sqlalchemy-studio
2
+
3
+ FastAPI studio for inspecting and querying SQLAlchemy databases.
4
+
5
+ ## Installation
6
+
7
+ Install from PyPI:
8
+
9
+ ```bash
10
+ pip install sqlalchemy-studio
11
+ ```
12
+
13
+ Or install the latest version from GitHub:
14
+
15
+ ```bash
16
+ pip install --upgrade git+https://github.com/coderxuz/sqlalchemy-studio.git@main#subdirectory=sqlalchemy-studio-backend
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ Create a normal SQLAlchemy engine and declarative base, then pass them to `Studio`.
22
+
23
+ ```python
24
+ from sqlalchemy import Integer, String, create_engine
25
+ from sqlalchemy.orm import DeclarativeBase, Mapped, Session, mapped_column
26
+
27
+ from sqlalchemy_studio import Studio
28
+
29
+
30
+ class Base(DeclarativeBase):
31
+ pass
32
+
33
+
34
+ class User(Base):
35
+ __tablename__ = "users"
36
+
37
+ id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
38
+ username: Mapped[str] = mapped_column(String(50), nullable=False)
39
+ email: Mapped[str] = mapped_column(String(120), nullable=False)
40
+
41
+
42
+ engine = create_engine("sqlite:///app.db")
43
+
44
+
45
+ def seed_data() -> None:
46
+ Base.metadata.create_all(engine)
47
+
48
+ with Session(engine) as session:
49
+ if session.query(User).count() == 0:
50
+ session.add_all(
51
+ [
52
+ User(username="john", email="john@example.com"),
53
+ User(username="alice", email="alice@example.com"),
54
+ ]
55
+ )
56
+ session.commit()
57
+
58
+
59
+ if __name__ == "__main__":
60
+ seed_data()
61
+ Studio(engine=engine, base=Base).run(port=7000)
62
+ ```
63
+
64
+ Run the script:
65
+
66
+ ```bash
67
+ python app.py
68
+ ```
69
+
70
+ Open `http://localhost:7000` in your browser.
71
+
72
+
73
+
74
+ ![Example dashboard](image.png)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "sqlalchemy-studio"
7
- version = "0.1.7"
7
+ version = "0.1.8"
8
8
  description = "FastAPI studio for inspecting SQLAlchemy databases"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -0,0 +1,97 @@
1
+ Metadata-Version: 2.4
2
+ Name: sqlalchemy-studio
3
+ Version: 0.1.8
4
+ Summary: FastAPI studio for inspecting SQLAlchemy databases
5
+ Author-email: Xursand Qarlibayev <coderxuz2009@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/coderxuz/sqlalchemy-studio
8
+ Project-URL: Source, https://github.com/coderxuz/sqlalchemy-studio
9
+ Keywords: sqlalchemy,database,inspector,studio
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Requires-Python: >=3.11
17
+ Description-Content-Type: text/markdown
18
+ Requires-Dist: build>=1.5.0
19
+ Requires-Dist: fastapi>=0.136.3
20
+ Requires-Dist: sqlalchemy>=2.0.50
21
+ Requires-Dist: twine>=6.2.0
22
+ Requires-Dist: uvicorn>=0.48.0
23
+
24
+ # sqlalchemy-studio
25
+
26
+ FastAPI studio for inspecting and querying SQLAlchemy databases.
27
+
28
+ ## Installation
29
+
30
+ Install from PyPI:
31
+
32
+ ```bash
33
+ pip install sqlalchemy-studio
34
+ ```
35
+
36
+ Or install the latest version from GitHub:
37
+
38
+ ```bash
39
+ pip install --upgrade git+https://github.com/coderxuz/sqlalchemy-studio.git@main#subdirectory=sqlalchemy-studio-backend
40
+ ```
41
+
42
+ ## Usage
43
+
44
+ Create a normal SQLAlchemy engine and declarative base, then pass them to `Studio`.
45
+
46
+ ```python
47
+ from sqlalchemy import Integer, String, create_engine
48
+ from sqlalchemy.orm import DeclarativeBase, Mapped, Session, mapped_column
49
+
50
+ from sqlalchemy_studio import Studio
51
+
52
+
53
+ class Base(DeclarativeBase):
54
+ pass
55
+
56
+
57
+ class User(Base):
58
+ __tablename__ = "users"
59
+
60
+ id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
61
+ username: Mapped[str] = mapped_column(String(50), nullable=False)
62
+ email: Mapped[str] = mapped_column(String(120), nullable=False)
63
+
64
+
65
+ engine = create_engine("sqlite:///app.db")
66
+
67
+
68
+ def seed_data() -> None:
69
+ Base.metadata.create_all(engine)
70
+
71
+ with Session(engine) as session:
72
+ if session.query(User).count() == 0:
73
+ session.add_all(
74
+ [
75
+ User(username="john", email="john@example.com"),
76
+ User(username="alice", email="alice@example.com"),
77
+ ]
78
+ )
79
+ session.commit()
80
+
81
+
82
+ if __name__ == "__main__":
83
+ seed_data()
84
+ Studio(engine=engine, base=Base).run(port=7000)
85
+ ```
86
+
87
+ Run the script:
88
+
89
+ ```bash
90
+ python app.py
91
+ ```
92
+
93
+ Open `http://localhost:7000` in your browser.
94
+
95
+
96
+
97
+ ![Example dashboard](image.png)
@@ -1,105 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: sqlalchemy-studio
3
- Version: 0.1.7
4
- Summary: FastAPI studio for inspecting SQLAlchemy databases
5
- Author-email: Xursand Qarlibayev <coderxuz2009@gmail.com>
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/coderxuz/sqlalchemy-studio
8
- Project-URL: Source, https://github.com/coderxuz/sqlalchemy-studio
9
- Keywords: sqlalchemy,database,inspector,studio
10
- Classifier: Development Status :: 4 - Beta
11
- Classifier: Intended Audience :: Developers
12
- Classifier: License :: OSI Approved :: MIT License
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3 :: Only
15
- Classifier: Programming Language :: Python :: 3.11
16
- Requires-Python: >=3.11
17
- Description-Content-Type: text/markdown
18
- Requires-Dist: build>=1.5.0
19
- Requires-Dist: fastapi>=0.136.3
20
- Requires-Dist: sqlalchemy>=2.0.50
21
- Requires-Dist: twine>=6.2.0
22
- Requires-Dist: uvicorn>=0.48.0
23
-
24
- # sqlalchemy-studio
25
-
26
- Backend utilities for inspecting and serving database tables via a FastAPI `Studio`.
27
-
28
- This package exposes a small FastAPI app that can be embedded in your application or run
29
- standalone to inspect a SQLAlchemy-accessible database.
30
-
31
- Quick summary
32
- - API endpoints (when using the packaged server):
33
- - `GET /api/tables` — list tables and columns
34
- - `GET /api/tables/{name}` — describe a single table
35
- - `POST /api/{table_name}/query` — run the UI's advanced query payload
36
-
37
- Install
38
-
39
- ```
40
- pip install sqlalchemy-studio
41
- ```
42
-
43
- Or install from the repository for development/testing:
44
-
45
- ```
46
- pip install --upgrade git+https://github.com/coderxuz/sqlalchemy-studio.git@main#subdirectory=sqlalchemy-studio-backend
47
- ```
48
-
49
- Quickstart
50
-
51
- ```py
52
- from sqlalchemy import create_engine
53
- from sqlalchemy.orm import DeclarativeBase
54
- from sqlalchemy_studio import Studio
55
-
56
- class Base(DeclarativeBase):
57
- pass
58
-
59
- engine = create_engine("sqlite:///test.db")
60
-
61
- studio = Studio(engine, Base)
62
- # Starts uvicorn and serves API under /api
63
- studio.run(port=9000)
64
- # API available at http://localhost:9000/api
65
- ```
66
-
67
- Serving a built frontend (optional)
68
-
69
- If you build the Vite frontend, copy its `dist` output into the backend `studio/static` folder
70
- and the backend will serve the SPA from `/` while keeping the API under `/api`.
71
-
72
- Example:
73
-
74
- ```bash
75
- # from repository root
76
- npm --prefix sqlalchemy-studio-front install
77
- npm --prefix sqlalchemy-studio-front run build
78
- rm -rf sqlalchemy-studio-backend/studio/static
79
- mkdir -p sqlalchemy-studio-backend/studio/static
80
- cp -r sqlalchemy-studio-front/dist/* sqlalchemy-studio-backend/studio/static/
81
- ```
82
-
83
- Configuration notes
84
- - By default the package mounts static files at `/` and prefixes API routes with `/api` to
85
- avoid SPA route collisions. Adjust `studio/Studio.py` if you need a different layout.
86
- - CORS: `Studio` registers a small set of development origins. When serving the SPA
87
- from the same server you won't need CORS; keep/update `Studio._set_cors` for other setups.
88
-
89
- Publishing
90
-
91
- 1. Build the distribution locally:
92
-
93
- ```bash
94
- python -m pip install --upgrade build twine
95
- python -m build
96
- ```
97
-
98
- 2. Upload to PyPI (CI should set `PYPI_API_TOKEN`):
99
-
100
- ```bash
101
- python -m twine upload dist/*
102
- ```
103
-
104
- License
105
- MIT — update as appropriate.
@@ -1,82 +0,0 @@
1
- # sqlalchemy-studio
2
-
3
- Backend utilities for inspecting and serving database tables via a FastAPI `Studio`.
4
-
5
- This package exposes a small FastAPI app that can be embedded in your application or run
6
- standalone to inspect a SQLAlchemy-accessible database.
7
-
8
- Quick summary
9
- - API endpoints (when using the packaged server):
10
- - `GET /api/tables` — list tables and columns
11
- - `GET /api/tables/{name}` — describe a single table
12
- - `POST /api/{table_name}/query` — run the UI's advanced query payload
13
-
14
- Install
15
-
16
- ```
17
- pip install sqlalchemy-studio
18
- ```
19
-
20
- Or install from the repository for development/testing:
21
-
22
- ```
23
- pip install --upgrade git+https://github.com/coderxuz/sqlalchemy-studio.git@main#subdirectory=sqlalchemy-studio-backend
24
- ```
25
-
26
- Quickstart
27
-
28
- ```py
29
- from sqlalchemy import create_engine
30
- from sqlalchemy.orm import DeclarativeBase
31
- from sqlalchemy_studio import Studio
32
-
33
- class Base(DeclarativeBase):
34
- pass
35
-
36
- engine = create_engine("sqlite:///test.db")
37
-
38
- studio = Studio(engine, Base)
39
- # Starts uvicorn and serves API under /api
40
- studio.run(port=9000)
41
- # API available at http://localhost:9000/api
42
- ```
43
-
44
- Serving a built frontend (optional)
45
-
46
- If you build the Vite frontend, copy its `dist` output into the backend `studio/static` folder
47
- and the backend will serve the SPA from `/` while keeping the API under `/api`.
48
-
49
- Example:
50
-
51
- ```bash
52
- # from repository root
53
- npm --prefix sqlalchemy-studio-front install
54
- npm --prefix sqlalchemy-studio-front run build
55
- rm -rf sqlalchemy-studio-backend/studio/static
56
- mkdir -p sqlalchemy-studio-backend/studio/static
57
- cp -r sqlalchemy-studio-front/dist/* sqlalchemy-studio-backend/studio/static/
58
- ```
59
-
60
- Configuration notes
61
- - By default the package mounts static files at `/` and prefixes API routes with `/api` to
62
- avoid SPA route collisions. Adjust `studio/Studio.py` if you need a different layout.
63
- - CORS: `Studio` registers a small set of development origins. When serving the SPA
64
- from the same server you won't need CORS; keep/update `Studio._set_cors` for other setups.
65
-
66
- Publishing
67
-
68
- 1. Build the distribution locally:
69
-
70
- ```bash
71
- python -m pip install --upgrade build twine
72
- python -m build
73
- ```
74
-
75
- 2. Upload to PyPI (CI should set `PYPI_API_TOKEN`):
76
-
77
- ```bash
78
- python -m twine upload dist/*
79
- ```
80
-
81
- License
82
- MIT — update as appropriate.
@@ -1,105 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: sqlalchemy-studio
3
- Version: 0.1.7
4
- Summary: FastAPI studio for inspecting SQLAlchemy databases
5
- Author-email: Xursand Qarlibayev <coderxuz2009@gmail.com>
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/coderxuz/sqlalchemy-studio
8
- Project-URL: Source, https://github.com/coderxuz/sqlalchemy-studio
9
- Keywords: sqlalchemy,database,inspector,studio
10
- Classifier: Development Status :: 4 - Beta
11
- Classifier: Intended Audience :: Developers
12
- Classifier: License :: OSI Approved :: MIT License
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3 :: Only
15
- Classifier: Programming Language :: Python :: 3.11
16
- Requires-Python: >=3.11
17
- Description-Content-Type: text/markdown
18
- Requires-Dist: build>=1.5.0
19
- Requires-Dist: fastapi>=0.136.3
20
- Requires-Dist: sqlalchemy>=2.0.50
21
- Requires-Dist: twine>=6.2.0
22
- Requires-Dist: uvicorn>=0.48.0
23
-
24
- # sqlalchemy-studio
25
-
26
- Backend utilities for inspecting and serving database tables via a FastAPI `Studio`.
27
-
28
- This package exposes a small FastAPI app that can be embedded in your application or run
29
- standalone to inspect a SQLAlchemy-accessible database.
30
-
31
- Quick summary
32
- - API endpoints (when using the packaged server):
33
- - `GET /api/tables` — list tables and columns
34
- - `GET /api/tables/{name}` — describe a single table
35
- - `POST /api/{table_name}/query` — run the UI's advanced query payload
36
-
37
- Install
38
-
39
- ```
40
- pip install sqlalchemy-studio
41
- ```
42
-
43
- Or install from the repository for development/testing:
44
-
45
- ```
46
- pip install --upgrade git+https://github.com/coderxuz/sqlalchemy-studio.git@main#subdirectory=sqlalchemy-studio-backend
47
- ```
48
-
49
- Quickstart
50
-
51
- ```py
52
- from sqlalchemy import create_engine
53
- from sqlalchemy.orm import DeclarativeBase
54
- from sqlalchemy_studio import Studio
55
-
56
- class Base(DeclarativeBase):
57
- pass
58
-
59
- engine = create_engine("sqlite:///test.db")
60
-
61
- studio = Studio(engine, Base)
62
- # Starts uvicorn and serves API under /api
63
- studio.run(port=9000)
64
- # API available at http://localhost:9000/api
65
- ```
66
-
67
- Serving a built frontend (optional)
68
-
69
- If you build the Vite frontend, copy its `dist` output into the backend `studio/static` folder
70
- and the backend will serve the SPA from `/` while keeping the API under `/api`.
71
-
72
- Example:
73
-
74
- ```bash
75
- # from repository root
76
- npm --prefix sqlalchemy-studio-front install
77
- npm --prefix sqlalchemy-studio-front run build
78
- rm -rf sqlalchemy-studio-backend/studio/static
79
- mkdir -p sqlalchemy-studio-backend/studio/static
80
- cp -r sqlalchemy-studio-front/dist/* sqlalchemy-studio-backend/studio/static/
81
- ```
82
-
83
- Configuration notes
84
- - By default the package mounts static files at `/` and prefixes API routes with `/api` to
85
- avoid SPA route collisions. Adjust `studio/Studio.py` if you need a different layout.
86
- - CORS: `Studio` registers a small set of development origins. When serving the SPA
87
- from the same server you won't need CORS; keep/update `Studio._set_cors` for other setups.
88
-
89
- Publishing
90
-
91
- 1. Build the distribution locally:
92
-
93
- ```bash
94
- python -m pip install --upgrade build twine
95
- python -m build
96
- ```
97
-
98
- 2. Upload to PyPI (CI should set `PYPI_API_TOKEN`):
99
-
100
- ```bash
101
- python -m twine upload dist/*
102
- ```
103
-
104
- License
105
- MIT — update as appropriate.