You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Set up virtual environment & Install dependencies:
36
+
37
+
```bash
38
+
cd FastAPI-fastkit
39
+
40
+
python -m venv .venv
41
+
source .venv/bin/activate # for Windows, use: .venv\Scripts\activate
42
+
43
+
pip install -r requirements.txt
44
+
```
30
45
31
46
### Linting & Formatting
32
47
33
-
(content will be added later - formatter : black)
48
+
Use these tools for code quality:
49
+
50
+
1. Black: Code formatting
51
+
52
+
```bash
53
+
bash scripts/format.sh
54
+
```
55
+
56
+
2. isort: Import sorting
57
+
58
+
```bash
59
+
bash scripts/sort.sh
60
+
```
61
+
62
+
3. mypy: Static type checking
63
+
64
+
```bash
65
+
bash scripts/lint.sh
66
+
```
67
+
34
68
35
69
### Making commits
36
70
37
-
(content will be added later - include custom commit tag like '[FEAT]', '[FIX]', '[TEST]', ...)
71
+
Use these tags in commit messages:
72
+
73
+
-[FEAT]: New feature
74
+
-[FIX]: Bug fix
75
+
-[DOCS]: Documentation changes
76
+
-[STYLE]: Code formatting
77
+
-[TEST]: Test code
78
+
-[REFACTOR]: Code refactoring
79
+
-[CHORE]: Build, config changes
80
+
81
+
Example:
82
+
83
+
```bash
84
+
git commit -m '[FEAT] Add new FastAPI template for microservices'
85
+
git commit -m '[FIX] Fix virtual environment activation in Windows'
86
+
```
38
87
39
88
## Documentation
40
89
41
-
(content will be added later)
90
+
Follow these documentation guidelines:
91
+
92
+
1. Docstring for all functions/classes (not necessary, but recommended)
93
+
2. Except for translations and typographical corrections, modifications to the core [README.md](README.md), [SECURITY.md](SECURITY.md), [CONTRIBUTING.md](CONTRIBUTING.md), [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) files of the FastAPI-fastkit project itself are prohibited.
42
94
43
95
## Testing
44
96
45
-
(content will be added later)
97
+
After writing new tests or modifying existing tests, run these commands to ensure the tests pass:
98
+
99
+
1. Run tests:
100
+
101
+
```bash
102
+
pytest tests/
103
+
```
104
+
105
+
2. Check coverage:
106
+
107
+
```bash
108
+
pytest --cov=src tests/
109
+
```
46
110
47
111
## Adding new FastAPI-based template project
48
112
49
-
(content will be added later)
50
-
(this block will contain about dependancy settings using virtual env, project tree, file extension of all sources(must end with .py-tpl),
51
-
README.md writing guide(using [PROJECT_README_TEMPLATE.md](src/fastapi_fastkit/fastapi_project_template/PROJECT_README_TEMPLATE.md) template), foldering, other third party config, etc...)
113
+
When adding a new FastAPI template project, follow these guidelines:
114
+
115
+
### Template Structure Requirements
116
+
117
+
1. Directory Structure:
118
+
119
+
```
120
+
template-name/
121
+
├── src/
122
+
│ ├── main.py-tpl
123
+
│ ├── config/
124
+
│ ├── models/
125
+
│ ├── routes/
126
+
│ └── utils/
127
+
├── tests/
128
+
├── scripts/
129
+
├── requirements.txt-tpl
130
+
├── setup.py-tpl
131
+
└── README.md-tpl
132
+
```
133
+
134
+
2. File Extensions:
135
+
- All Python source files must use `.py-tpl` extension
136
+
- Template files must include proper configuration files (.env-tpl, etc.)
137
+
138
+
3. Dependencies:
139
+
- Include `fastapi-fastkit` in setup.py
140
+
- Specify version numbers in requirements.txt
141
+
- Use latest stable versions of dependencies
142
+
143
+
### Security Requirements
144
+
145
+
1. Implementation Requirements:
146
+
- Environment variables management (.env)
147
+
- Basic authentication system
148
+
- CORS configuration
149
+
- Exception handling and logging
150
+
151
+
2. Security Checks:
152
+
- All template code must pass `inspector.py` validation
153
+
- Include security middleware configurations
154
+
- Follow security guidelines in SECURITY.md
155
+
156
+
### Documentation
157
+
158
+
1. README.md Requirements:
159
+
- Use PROJECT_README_TEMPLATE.md format
160
+
- Include comprehensive setup instructions
161
+
- Document all environment variables
162
+
- List all major dependencies
163
+
- Provide API documentation
164
+
165
+
2. Code Documentation:
166
+
- Include docstrings for all functions/classes
167
+
- Document API endpoints
168
+
- Include example usage (not necessary, but recommended)
169
+
- Provide configuration explanations
170
+
171
+
### Testing
172
+
173
+
1. Required Tests:
174
+
- Basic CRUD operations
175
+
- Authentication/Authorization
176
+
- Error handling
177
+
- API endpoints
178
+
- Configuration validation
179
+
180
+
2. Test Coverage:
181
+
- Minimum 80% code coverage
182
+
- Include integration tests
183
+
- API testing examples
184
+
185
+
### Submission Process
186
+
187
+
1. Initial Setup:
188
+
- Clone or Fork the repository
189
+
- Create a new branch for your template
190
+
- Follow the template structure
191
+
192
+
2. Development:
193
+
- Implement required features
194
+
- Add comprehensive tests
195
+
- Document all components
196
+
- Run inspector.py validation
197
+
198
+
3. Pre-submission Checklist:
199
+
-[ ] All files use .py-tpl extension
200
+
-[ ] FastAPI-fastkit dependency included
201
+
-[ ] README.md follows template
202
+
-[ ] Security requirements met
203
+
-[ ] Tests implemented and passing
204
+
-[ ] Documentation complete
205
+
-[ ] inspector.py validation passes
206
+
207
+
4. Pull Request:
208
+
- Provide detailed description
209
+
- Include test results
210
+
- Document any special requirements
211
+
- Reference related issues
212
+
213
+
For more detailed information about security requirements and project guidelines, please refer to:
214
+
-[SECURITY.md](SECURITY.md) for security guidelines
215
+
-[CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) for project principles
52
216
53
217
## Additional note
54
218
@@ -58,9 +222,9 @@ In that section, I have my information as the manager of this project as author,
58
222
59
223
I emphasize that the reason I left my information in the comment section is to specify the information about the project's final director and not to increase the barriers to entry into the open source contribution of other contributors.
60
224
61
-
**However**, I would like to inform you that I have only the right to modify the document file itself such as .md file.
225
+
**However**, I would like to inform you that I have only the right to modify the document file content itself of FastAPI-fastkit project's core documents (README.md, SECURITY.md, CODE_OF_CONDUCT.md, CONTRIBUTING.md) file.
62
226
63
-
If the contribution to the project includes the contribution to the document, there is a possibility that PR will be rejected.
227
+
If the contribution to the project includes the document contribution except translation and typographical corrections, there is a possibility that PR will be rejected.
<em><b>FastAPI-fastkit</b>: Fast, easy-to-use starter kit for new users of Python and FastAPI</em>
@@ -17,11 +17,146 @@
17
17
18
18
This project was created to speed up the configuration of the development environment needed to develop Python-based web apps for new users of Python and [FastAPI](https://github.com/fastapi/fastapi).
19
19
20
-
This project was inspired by the `SpringBoot initializer`of the JAVA ecosystem & Python Django's `django-admin` cli operation.
20
+
This project was inspired by the `SpringBoot initializer` & Python Django's `django-admin` cli operation.
21
21
22
22
---
23
23
24
-
(other content will be updated later)
24
+
## Key Features
25
+
26
+
-**Immediate FastAPI project creation** : Super-fast FastAPI workspace & project creation via CLI, inspired by `django-admin`feature of [Python Django](https://github.com/django/django)
FastAPI-fastkit aims to provide a fast and easy-to-use starter kit for new users of Python and FastAPI.
149
+
150
+
This idea was initiated with the aim of full fill to help FastAPI newcomers to learn from the beginning, which is the production significance of the FastAPI-cli package added with the [FastAPI 0.111.0 version update](https://github.com/fastapi/fastapi/releases/tag/0.111.0).
151
+
152
+
As one person who has been using and loving FastAPI for a long time, I wanted to develop a project that could help me a little bit to practice [the wonderful motivation](https://github.com/fastapi/fastapi/pull/11522#issuecomment-2264639417) that FastAPI developer [tiangolo](https://github.com/tiangolo) has.
25
153
26
154
---
155
+
156
+
## License
157
+
158
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
0 commit comments