Comments (3)
Definitely! I was planing some kind of generator for the next release. I haven't yet figured out exactly how I want to implement this, but it'll be using a cookie-cutter template underneath. I guess a CLI, which will be an entry point to all actions on the template (new, serve, test, etc). And then I'll probably publish this package to PyPI as well.
For now, you can use this script, it should rename project properly.
#!/usr/bin/env bash
if [ -n "$DEBUG" ]; then
set -x
fi
set -o errexit
set -o nounset
set -o pipefail
if [[ -z "$1" ]]; then
echo "Parameter project name is empty."
exit 1
fi
if [[ -z "$2" ]]; then
echo "Parameter project url is empty."
exit 1
fi
grep -rl "https://github.com/rszamszur/fastapi-mvc-template" | xargs sed -i "s/https:\/\/github.com\/rszamszur\/fastapi-mvc-template/${2//\//\\/}/g"
mv charts/fastapi-mvc-template charts/$1
if [[ $1 == *"-"* ]]; then
mv fastapi_mvc_template ${1//-/_}
grep -rl --exclude-dir=.git fastapi_mvc_template | xargs sed -i "s/fastapi_mvc_template/${1//-/_}/g"
else
mv fastapi_mvc_template $1
grep -rl --exclude-dir=.git fastapi_mvc_template | xargs sed -i "s/fastapi_mvc_template/$1/g"
fi
grep -rl --exclude-dir=.git fastapi-mvc-template | xargs sed -i "s/fastapi-mvc-template/$1/g"
grep -rl --exclude-dir=.git 'FastAPI MVC template' | xargs sed -i "s/FastAPI MVC template/$1/g"
grep -rl --exclude-dir=.git 'Fastapi MVC template' | xargs sed -i "s/FastAPI MVC template/$1/g"
from fastapi-mvc.
@andrewthetechie final release is yet to be done, but the cookie-cutter template is ready and the prerelease package is in PyPI.
Install
pip install fastapi-mvc
Generate project
# Example
# name or path
fastapi-mvc new foobar
# Usage
Usage: fastapi-mvc new [OPTIONS] APP_PATH
Create a new FastAPI application.
The 'fastapi-mvc new' command creates a new FastAPI application with a
default directory structure and configuration at the path you specify.
Options:
-R, --skip-redis Skip Redis utility files.
-A, --skip-aiohttp Skip aiohttp utility files.
-V, --skip-vagrantfile Skip Vagrantfile.
-H, --skip-helm Skip Helm chart files.
-G, --skip-actions Skip GitHub actions files.
-C, --skip-codecov Skip codecov in GitHub actions.
-I, --skip-install Dont run make install
--license [MIT|BSD2|BSD3|ISC|Apache2.0|LGPLv3+|LGPLv3|LGPLv2+|LGPLv2|no]
Choose license. [default: MIT]
--repo-url TEXT Repository url.
--help Show this message and exit.
Example generated project with full configuration
from fastapi-mvc.
very cool!
from fastapi-mvc.
Related Issues (20)
- Implement new generator - shell script
- Add support for Python 3.11
- Add support for Python 3.11 for copier-project
- Create initial copier template for shell script generator HOT 1
- Handle generator aliases conflicts
- Allow generators lookup paths configuration via an environment variable
- Refactor Nix expressions to flakes
- Refactor Nix expressions to flakes for copier-project
- Refactor and improve tests suite
- Refactor and improve copier-project tests suite
- Implement `fastapi-mvc update` command HOT 1
- Update Poetry to 1.3.x
- Refactor Nix expressions to flake
- Refactor API for generator command line interface implementation
- Update `copier-generator` template to work with the new API for creating generator's CLIs.
- Update flake nixpkgs to 23.05
- Update Poetry to 1.5.x
- Unable to create new project HOT 5
- Drop Netlify
- FastApi-Documentation missing / Broken Link
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastapi-mvc.