Auto Code Generation Tools
This is a tool for code generatation, define an api.json
file, output api codes.
Recently, this tool is used for flask
app.
pip install -r requirement
cd acgt
python setup.py install
- api.json :
{
“api”: [ {
"module":"module_name",
"detail":[
"method":"get(post)",
"name":"method_name",
"arguments":"",
"result":""
]
}]
}
Take a look at api.json for more detail.
- acgt
acgt usage
- acgt init
acgt init [option] PROJECT_NAME
- for flask
acgt init --flask=True PROJECT_NAME
acgt init --flask=True "example"
it requires api.json
at the same directory
from acgt.acgt import Acgt
def main():
# project_name = "example"
Acgt("example").parse_apis()
if __name__ == '__main__':
main()
Take a look at scripts.py