Data access build with autoboot
Project description
autoboot data starter
基于 autoboot 框架的扩展,用于支持数据层接入。
Quick Start
Install
pip install autoboot-web
Usage
配置
- 启动配置文件
.env
# 环境名称(默认值:dev,框架根据这个配置项来加载当前的环境配置)
ENV_NAME=dev
APPLICATION_NAME=data-runner
- 环境配置文件
.env.dev
APPLICATION_NAME=data-runner-dev
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
- 主配置文件
autoboot.yaml
autoboot:
application:
name: !env APPLICATION_NAME
module: api
data:
redis:
host: !env REDIS_HOST
port: !env REDIS_PORT
创建并启动容器
from autoboot import AutoBoot, AutoBootConfig
from autoboot_data import redis
context = AutoBoot(AutoBootConfig(config_dir="."))
context.run()
r = redis.connection()
AutoBoot.logger.info(r.ping())
Contributors
有问题可以在issues开话题讨论,如果你有新的想法,创建新的feat
或pref
分支并提交PR。
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
autoboot_data-0.3.0.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for autoboot_data-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5687b7b3e9dd82677dbc966573f24c53e26f26eb518d1d9efb0ba9037d5e61e4 |
|
MD5 | 4f8e2a6a3f1dd084f24be26203fdaaf1 |
|
BLAKE2b-256 | c0d73f1d15e88b192e745ac436f9ea922f76214f46c551efe91a1405db70c69f |