GoodbyeSQL 0.5__tar.gz → 0.5.2__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.
- goodbyesql-0.5.2/GoodbyeSQL.egg-info/PKG-INFO +147 -0
- {goodbyesql-0.5 → goodbyesql-0.5.2}/GoodbyeSQL.egg-info/SOURCES.txt +3 -1
- {goodbyesql-0.5 → goodbyesql-0.5.2}/GoodbyeSQL.egg-info/requires.txt +1 -0
- goodbyesql-0.5.2/PKG-INFO +147 -0
- goodbyesql-0.5.2/README.md +137 -0
- goodbyesql-0.5.2/goodbyesql/__init__.py +10 -0
- goodbyesql-0.5.2/goodbyesql/config.py +16 -0
- {goodbyesql-0.5 → goodbyesql-0.5.2}/goodbyesql/main.py +7 -2
- goodbyesql-0.5.2/goodbyesql/registry.py +17 -0
- {goodbyesql-0.5 → goodbyesql-0.5.2}/setup.py +8 -2
- goodbyesql-0.5/GoodbyeSQL.egg-info/PKG-INFO +0 -5
- goodbyesql-0.5/PKG-INFO +0 -5
- goodbyesql-0.5/goodbyesql/__init__.py +0 -3
- goodbyesql-0.5/goodbyesql/config.py +0 -11
- {goodbyesql-0.5 → goodbyesql-0.5.2}/GoodbyeSQL.egg-info/dependency_links.txt +0 -0
- {goodbyesql-0.5 → goodbyesql-0.5.2}/GoodbyeSQL.egg-info/entry_points.txt +0 -0
- {goodbyesql-0.5 → goodbyesql-0.5.2}/GoodbyeSQL.egg-info/top_level.txt +0 -0
- {goodbyesql-0.5 → goodbyesql-0.5.2}/setup.cfg +0 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: GoodbyeSQL
|
|
3
|
+
Version: 0.5.2
|
|
4
|
+
Description-Content-Type: text/markdown
|
|
5
|
+
Requires-Dist: sqlalchemy==2.0.43
|
|
6
|
+
Requires-Dist: fastapi==0.135.1
|
|
7
|
+
Dynamic: description
|
|
8
|
+
Dynamic: description-content-type
|
|
9
|
+
Dynamic: requires-dist
|
|
10
|
+
|
|
11
|
+
# goodbyesql
|
|
12
|
+
|
|
13
|
+
### Simplify SQLAlchemy. Say goodbye to repetitive database code.
|
|
14
|
+
|
|
15
|
+
`goodbyesql` is a lightweight Python library built on top of **SQLAlchemy** that helps backend developers reduce repetitive database boilerplate.
|
|
16
|
+
|
|
17
|
+
It provides a simple interface for working with common SQLAlchemy operations while keeping SQLAlchemy underneath.
|
|
18
|
+
|
|
19
|
+
## ✨ Features
|
|
20
|
+
|
|
21
|
+
* 🐍 Built for Python backend applications
|
|
22
|
+
* 🗄️ Built on top of SQLAlchemy
|
|
23
|
+
* ⚡ Simplifies common database operations
|
|
24
|
+
* 🧹 Reduces repetitive SQLAlchemy boilerplate
|
|
25
|
+
* ⚙️ Configurable database setup
|
|
26
|
+
* 🔌 Custom session provider support
|
|
27
|
+
|
|
28
|
+
## 📦 Installation
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install goodbyesql
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 🚀 Quick Start
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
from goodbyesql import GoodbyeSQL, GoodbyeSQLConfig
|
|
38
|
+
|
|
39
|
+
config = GoodbyeSQLConfig(
|
|
40
|
+
# your configuration
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
db = GoodbyeSQL(config)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`GoodbyeSQL` provides a higher-level interface for common database operations while using SQLAlchemy internally.
|
|
47
|
+
|
|
48
|
+
## 🔧 Session Provider
|
|
49
|
+
|
|
50
|
+
`goodbyesql` also allows you to configure your own SQLAlchemy session provider:
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
from goodbyesql import set_session_provider
|
|
54
|
+
|
|
55
|
+
set_session_provider(your_session_provider)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
This makes it possible to integrate `goodbyesql` into existing backend architectures where database sessions are already managed by the application.
|
|
59
|
+
|
|
60
|
+
## 🏗️ How It Works
|
|
61
|
+
|
|
62
|
+
`goodbyesql` is not a replacement for SQLAlchemy.
|
|
63
|
+
|
|
64
|
+
Instead, it provides a convenient abstraction on top of it:
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
┌─────────────────────┐
|
|
68
|
+
│ Your Application │
|
|
69
|
+
└──────────┬──────────┘
|
|
70
|
+
│
|
|
71
|
+
▼
|
|
72
|
+
┌─────────────────────┐
|
|
73
|
+
│ goodbyesql │
|
|
74
|
+
│ Simple DB API │
|
|
75
|
+
└──────────┬──────────┘
|
|
76
|
+
│
|
|
77
|
+
▼
|
|
78
|
+
┌─────────────────────┐
|
|
79
|
+
│ SQLAlchemy │
|
|
80
|
+
└──────────┬──────────┘
|
|
81
|
+
│
|
|
82
|
+
▼
|
|
83
|
+
┌─────────────────────┐
|
|
84
|
+
│ Database │
|
|
85
|
+
└─────────────────────┘
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
The goal is simple:
|
|
89
|
+
|
|
90
|
+
> **Write less repetitive database code and focus more on your application.**
|
|
91
|
+
|
|
92
|
+
## 🎯 Who is it for?
|
|
93
|
+
|
|
94
|
+
`goodbyesql` is designed primarily for **Python backend developers** who use SQLAlchemy and want a simpler way to handle common database functionality.
|
|
95
|
+
|
|
96
|
+
It can be especially useful in projects such as:
|
|
97
|
+
|
|
98
|
+
* REST APIs
|
|
99
|
+
* FastAPI applications
|
|
100
|
+
* Backend services
|
|
101
|
+
* Automation systems
|
|
102
|
+
* Microservices
|
|
103
|
+
* Other Python applications using SQLAlchemy
|
|
104
|
+
|
|
105
|
+
## 📚 Public API
|
|
106
|
+
|
|
107
|
+
### `GoodbyeSQL`
|
|
108
|
+
|
|
109
|
+
The main class used to work with `goodbyesql`.
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
from goodbyesql import GoodbyeSQL
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### `GoodbyeSQLConfig`
|
|
116
|
+
|
|
117
|
+
Configuration for `GoodbyeSQL`.
|
|
118
|
+
|
|
119
|
+
```python
|
|
120
|
+
from goodbyesql import GoodbyeSQLConfig
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### `set_session_provider`
|
|
124
|
+
|
|
125
|
+
Configure the session provider used by `goodbyesql`.
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
from goodbyesql import set_session_provider
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## 🚧 Project Status
|
|
132
|
+
|
|
133
|
+
`goodbyesql` is currently under active development.
|
|
134
|
+
|
|
135
|
+
The API may change in future releases as the project evolves.
|
|
136
|
+
|
|
137
|
+
Feedback, issues, and contributions are welcome.
|
|
138
|
+
|
|
139
|
+
## 🤝 Contributing
|
|
140
|
+
|
|
141
|
+
Contributions are welcome!
|
|
142
|
+
|
|
143
|
+
Feel free to open an issue or submit a pull request if you have an idea, improvement, or bug fix.
|
|
144
|
+
|
|
145
|
+
## 📄 License
|
|
146
|
+
|
|
147
|
+
See the `LICENSE` file for license information.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
README.md
|
|
1
2
|
setup.py
|
|
2
3
|
GoodbyeSQL.egg-info/PKG-INFO
|
|
3
4
|
GoodbyeSQL.egg-info/SOURCES.txt
|
|
@@ -7,4 +8,5 @@ GoodbyeSQL.egg-info/requires.txt
|
|
|
7
8
|
GoodbyeSQL.egg-info/top_level.txt
|
|
8
9
|
goodbyesql/__init__.py
|
|
9
10
|
goodbyesql/config.py
|
|
10
|
-
goodbyesql/main.py
|
|
11
|
+
goodbyesql/main.py
|
|
12
|
+
goodbyesql/registry.py
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: GoodbyeSQL
|
|
3
|
+
Version: 0.5.2
|
|
4
|
+
Description-Content-Type: text/markdown
|
|
5
|
+
Requires-Dist: sqlalchemy==2.0.43
|
|
6
|
+
Requires-Dist: fastapi==0.135.1
|
|
7
|
+
Dynamic: description
|
|
8
|
+
Dynamic: description-content-type
|
|
9
|
+
Dynamic: requires-dist
|
|
10
|
+
|
|
11
|
+
# goodbyesql
|
|
12
|
+
|
|
13
|
+
### Simplify SQLAlchemy. Say goodbye to repetitive database code.
|
|
14
|
+
|
|
15
|
+
`goodbyesql` is a lightweight Python library built on top of **SQLAlchemy** that helps backend developers reduce repetitive database boilerplate.
|
|
16
|
+
|
|
17
|
+
It provides a simple interface for working with common SQLAlchemy operations while keeping SQLAlchemy underneath.
|
|
18
|
+
|
|
19
|
+
## ✨ Features
|
|
20
|
+
|
|
21
|
+
* 🐍 Built for Python backend applications
|
|
22
|
+
* 🗄️ Built on top of SQLAlchemy
|
|
23
|
+
* ⚡ Simplifies common database operations
|
|
24
|
+
* 🧹 Reduces repetitive SQLAlchemy boilerplate
|
|
25
|
+
* ⚙️ Configurable database setup
|
|
26
|
+
* 🔌 Custom session provider support
|
|
27
|
+
|
|
28
|
+
## 📦 Installation
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install goodbyesql
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 🚀 Quick Start
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
from goodbyesql import GoodbyeSQL, GoodbyeSQLConfig
|
|
38
|
+
|
|
39
|
+
config = GoodbyeSQLConfig(
|
|
40
|
+
# your configuration
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
db = GoodbyeSQL(config)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`GoodbyeSQL` provides a higher-level interface for common database operations while using SQLAlchemy internally.
|
|
47
|
+
|
|
48
|
+
## 🔧 Session Provider
|
|
49
|
+
|
|
50
|
+
`goodbyesql` also allows you to configure your own SQLAlchemy session provider:
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
from goodbyesql import set_session_provider
|
|
54
|
+
|
|
55
|
+
set_session_provider(your_session_provider)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
This makes it possible to integrate `goodbyesql` into existing backend architectures where database sessions are already managed by the application.
|
|
59
|
+
|
|
60
|
+
## 🏗️ How It Works
|
|
61
|
+
|
|
62
|
+
`goodbyesql` is not a replacement for SQLAlchemy.
|
|
63
|
+
|
|
64
|
+
Instead, it provides a convenient abstraction on top of it:
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
┌─────────────────────┐
|
|
68
|
+
│ Your Application │
|
|
69
|
+
└──────────┬──────────┘
|
|
70
|
+
│
|
|
71
|
+
▼
|
|
72
|
+
┌─────────────────────┐
|
|
73
|
+
│ goodbyesql │
|
|
74
|
+
│ Simple DB API │
|
|
75
|
+
└──────────┬──────────┘
|
|
76
|
+
│
|
|
77
|
+
▼
|
|
78
|
+
┌─────────────────────┐
|
|
79
|
+
│ SQLAlchemy │
|
|
80
|
+
└──────────┬──────────┘
|
|
81
|
+
│
|
|
82
|
+
▼
|
|
83
|
+
┌─────────────────────┐
|
|
84
|
+
│ Database │
|
|
85
|
+
└─────────────────────┘
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
The goal is simple:
|
|
89
|
+
|
|
90
|
+
> **Write less repetitive database code and focus more on your application.**
|
|
91
|
+
|
|
92
|
+
## 🎯 Who is it for?
|
|
93
|
+
|
|
94
|
+
`goodbyesql` is designed primarily for **Python backend developers** who use SQLAlchemy and want a simpler way to handle common database functionality.
|
|
95
|
+
|
|
96
|
+
It can be especially useful in projects such as:
|
|
97
|
+
|
|
98
|
+
* REST APIs
|
|
99
|
+
* FastAPI applications
|
|
100
|
+
* Backend services
|
|
101
|
+
* Automation systems
|
|
102
|
+
* Microservices
|
|
103
|
+
* Other Python applications using SQLAlchemy
|
|
104
|
+
|
|
105
|
+
## 📚 Public API
|
|
106
|
+
|
|
107
|
+
### `GoodbyeSQL`
|
|
108
|
+
|
|
109
|
+
The main class used to work with `goodbyesql`.
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
from goodbyesql import GoodbyeSQL
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### `GoodbyeSQLConfig`
|
|
116
|
+
|
|
117
|
+
Configuration for `GoodbyeSQL`.
|
|
118
|
+
|
|
119
|
+
```python
|
|
120
|
+
from goodbyesql import GoodbyeSQLConfig
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### `set_session_provider`
|
|
124
|
+
|
|
125
|
+
Configure the session provider used by `goodbyesql`.
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
from goodbyesql import set_session_provider
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## 🚧 Project Status
|
|
132
|
+
|
|
133
|
+
`goodbyesql` is currently under active development.
|
|
134
|
+
|
|
135
|
+
The API may change in future releases as the project evolves.
|
|
136
|
+
|
|
137
|
+
Feedback, issues, and contributions are welcome.
|
|
138
|
+
|
|
139
|
+
## 🤝 Contributing
|
|
140
|
+
|
|
141
|
+
Contributions are welcome!
|
|
142
|
+
|
|
143
|
+
Feel free to open an issue or submit a pull request if you have an idea, improvement, or bug fix.
|
|
144
|
+
|
|
145
|
+
## 📄 License
|
|
146
|
+
|
|
147
|
+
See the `LICENSE` file for license information.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# goodbyesql
|
|
2
|
+
|
|
3
|
+
### Simplify SQLAlchemy. Say goodbye to repetitive database code.
|
|
4
|
+
|
|
5
|
+
`goodbyesql` is a lightweight Python library built on top of **SQLAlchemy** that helps backend developers reduce repetitive database boilerplate.
|
|
6
|
+
|
|
7
|
+
It provides a simple interface for working with common SQLAlchemy operations while keeping SQLAlchemy underneath.
|
|
8
|
+
|
|
9
|
+
## ✨ Features
|
|
10
|
+
|
|
11
|
+
* 🐍 Built for Python backend applications
|
|
12
|
+
* 🗄️ Built on top of SQLAlchemy
|
|
13
|
+
* ⚡ Simplifies common database operations
|
|
14
|
+
* 🧹 Reduces repetitive SQLAlchemy boilerplate
|
|
15
|
+
* ⚙️ Configurable database setup
|
|
16
|
+
* 🔌 Custom session provider support
|
|
17
|
+
|
|
18
|
+
## 📦 Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pip install goodbyesql
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 🚀 Quick Start
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
from goodbyesql import GoodbyeSQL, GoodbyeSQLConfig
|
|
28
|
+
|
|
29
|
+
config = GoodbyeSQLConfig(
|
|
30
|
+
# your configuration
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
db = GoodbyeSQL(config)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`GoodbyeSQL` provides a higher-level interface for common database operations while using SQLAlchemy internally.
|
|
37
|
+
|
|
38
|
+
## 🔧 Session Provider
|
|
39
|
+
|
|
40
|
+
`goodbyesql` also allows you to configure your own SQLAlchemy session provider:
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
from goodbyesql import set_session_provider
|
|
44
|
+
|
|
45
|
+
set_session_provider(your_session_provider)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
This makes it possible to integrate `goodbyesql` into existing backend architectures where database sessions are already managed by the application.
|
|
49
|
+
|
|
50
|
+
## 🏗️ How It Works
|
|
51
|
+
|
|
52
|
+
`goodbyesql` is not a replacement for SQLAlchemy.
|
|
53
|
+
|
|
54
|
+
Instead, it provides a convenient abstraction on top of it:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
┌─────────────────────┐
|
|
58
|
+
│ Your Application │
|
|
59
|
+
└──────────┬──────────┘
|
|
60
|
+
│
|
|
61
|
+
▼
|
|
62
|
+
┌─────────────────────┐
|
|
63
|
+
│ goodbyesql │
|
|
64
|
+
│ Simple DB API │
|
|
65
|
+
└──────────┬──────────┘
|
|
66
|
+
│
|
|
67
|
+
▼
|
|
68
|
+
┌─────────────────────┐
|
|
69
|
+
│ SQLAlchemy │
|
|
70
|
+
└──────────┬──────────┘
|
|
71
|
+
│
|
|
72
|
+
▼
|
|
73
|
+
┌─────────────────────┐
|
|
74
|
+
│ Database │
|
|
75
|
+
└─────────────────────┘
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The goal is simple:
|
|
79
|
+
|
|
80
|
+
> **Write less repetitive database code and focus more on your application.**
|
|
81
|
+
|
|
82
|
+
## 🎯 Who is it for?
|
|
83
|
+
|
|
84
|
+
`goodbyesql` is designed primarily for **Python backend developers** who use SQLAlchemy and want a simpler way to handle common database functionality.
|
|
85
|
+
|
|
86
|
+
It can be especially useful in projects such as:
|
|
87
|
+
|
|
88
|
+
* REST APIs
|
|
89
|
+
* FastAPI applications
|
|
90
|
+
* Backend services
|
|
91
|
+
* Automation systems
|
|
92
|
+
* Microservices
|
|
93
|
+
* Other Python applications using SQLAlchemy
|
|
94
|
+
|
|
95
|
+
## 📚 Public API
|
|
96
|
+
|
|
97
|
+
### `GoodbyeSQL`
|
|
98
|
+
|
|
99
|
+
The main class used to work with `goodbyesql`.
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
from goodbyesql import GoodbyeSQL
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### `GoodbyeSQLConfig`
|
|
106
|
+
|
|
107
|
+
Configuration for `GoodbyeSQL`.
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
from goodbyesql import GoodbyeSQLConfig
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### `set_session_provider`
|
|
114
|
+
|
|
115
|
+
Configure the session provider used by `goodbyesql`.
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
from goodbyesql import set_session_provider
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## 🚧 Project Status
|
|
122
|
+
|
|
123
|
+
`goodbyesql` is currently under active development.
|
|
124
|
+
|
|
125
|
+
The API may change in future releases as the project evolves.
|
|
126
|
+
|
|
127
|
+
Feedback, issues, and contributions are welcome.
|
|
128
|
+
|
|
129
|
+
## 🤝 Contributing
|
|
130
|
+
|
|
131
|
+
Contributions are welcome!
|
|
132
|
+
|
|
133
|
+
Feel free to open an issue or submit a pull request if you have an idea, improvement, or bug fix.
|
|
134
|
+
|
|
135
|
+
## 📄 License
|
|
136
|
+
|
|
137
|
+
See the `LICENSE` file for license information.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
from typing import Any
|
|
3
|
+
from pydantic_settings import BaseSettings
|
|
4
|
+
from typing import List, Annotated
|
|
5
|
+
from sqlalchemy.ext.asyncio import AsyncSession
|
|
6
|
+
from fastapi import Depends
|
|
7
|
+
from goodbyesql.registry import get_session
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@dataclass
|
|
11
|
+
class GoodbyeSQLConfig(BaseSettings):
|
|
12
|
+
user_model: List[str]
|
|
13
|
+
username_field: str = 'username'
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
from sqlalchemy.ext.asyncio import AsyncSession
|
|
2
2
|
from sqlalchemy import select
|
|
3
|
-
from config import GoodbyeSQLConfig
|
|
3
|
+
from goodbyesql.config import GoodbyeSQLConfig
|
|
4
|
+
from typing import Annotated
|
|
5
|
+
from fastapi import Depends
|
|
6
|
+
from goodbyesql.registry import get_session
|
|
7
|
+
|
|
8
|
+
DB_Session = Annotated[AsyncSession, Depends(get_session)]
|
|
4
9
|
|
|
5
10
|
|
|
6
11
|
class GoodbyeSQL:
|
|
7
12
|
def __init__(self, config: GoodbyeSQLConfig):
|
|
8
13
|
self.config = config
|
|
9
14
|
|
|
10
|
-
async def get_info_by_username(self, *, session:
|
|
15
|
+
async def get_info_by_username(self, *, session: DB_Session, username: str):
|
|
11
16
|
|
|
12
17
|
model = self.config.user_model
|
|
13
18
|
field = getattr(model,self.config.username_field)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from typing import Callable, Optional
|
|
2
|
+
|
|
3
|
+
_session_provider : Optional[Callable] = None
|
|
4
|
+
|
|
5
|
+
def set_session_provider(provider: Callable) -> None:
|
|
6
|
+
global _session_provider
|
|
7
|
+
|
|
8
|
+
_session_provider = provider
|
|
9
|
+
|
|
10
|
+
def get_session():
|
|
11
|
+
if _session_provider is None:
|
|
12
|
+
RuntimeError(
|
|
13
|
+
"Session have not been set up yet."
|
|
14
|
+
"You can set your session via set_session_provider function!"
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
return _session_provider()
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
from setuptools import setup, find_packages
|
|
2
2
|
|
|
3
|
+
with open("README.md", "r", encoding="utf-8") as f:
|
|
4
|
+
description = f.read()
|
|
5
|
+
|
|
3
6
|
setup(
|
|
4
7
|
name='GoodbyeSQL',
|
|
5
|
-
version='0.5',
|
|
8
|
+
version='0.5.2',
|
|
6
9
|
packages=find_packages(),
|
|
7
10
|
install_requires=[
|
|
8
11
|
'sqlalchemy==2.0.43',
|
|
12
|
+
'fastapi==0.135.1',
|
|
9
13
|
],
|
|
10
14
|
entry_points={
|
|
11
15
|
"console_scripts":[
|
|
12
16
|
"goodbyesql=goodbyesql.main:main"
|
|
13
17
|
]
|
|
14
|
-
}
|
|
18
|
+
},
|
|
19
|
+
long_description=description,
|
|
20
|
+
long_description_content_type="text/markdown"
|
|
15
21
|
)
|
goodbyesql-0.5/PKG-INFO
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|