Code Monkey home page Code Monkey logo

autoboot-data's Introduction

autoboot data starter

基于 autoboot 框架的扩展,用于支持数据层接入。

Version Python Downloads License

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开话题讨论,如果你有新的想法,创建新的featpref分支并提交PR。

License

MIT License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.