Skip to main content

Rapidly create services.

Project description

` <https://gitter.im/oriole-service/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link>`__ ` <https://travis-ci.org/zhouxiaoxiang/oriole-service>`__

【Chinese readme】

【English readme】

【Code】

The Zen of oriole: speed defines the winner.

Prerequisites

  1. Install following packages
  • python >= 3.6
  • mongodb
  • mysql
  • rabbitmq
  • redis
  1. Install oriole-service
pip install oriole-service

Add services.cfg

services.cfg

AMQP_URI:      ${RABBIT:pyamqp://test:test@127.0.0.1}
database:      ${MYSQL:mysql://test:test@127.0.0.1/test?charset=utf8}
test_database: ${TEST_MYSQL:mysql://test:test@127.0.0.1/test?charset=utf8}
datasets:      ${REDIS:redis://127.0.0.1/0}

Add orm

dao/__init__.py

from oriole_service.db import *

class Eric(Base):
    __tablename__ = 'eric_table'
    uid = Column(types.Integer(), primary_key=True, autoincrement=True)
    param = Column(types.Unicode(255), unique=None, default='')

Add services/log.py

services/log.py

from oriole_service.app import *

class LogService(App):
    name = service_name(__file__)
    ver = "1.0.0"

    @rpc
    def add(self, params={"param": "eric"}):
        self.log.debug("# %s(%s)" % ("add", params))
        return self._o(params)

Run log service

o r log

Run console

o s

image0

Halt log service

o h log

Create documents.

o d

Check online services

 You can run o s to do the same thing.

image1

Create docker image.

Don’t use it if you don’t know docker at all before.

Create log_service image.

o b log

OK, now you can deploy it into kubernetes.

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
oriole_service-17.2.0-py3-none-any.whl (14.8 kB) Copy SHA256 hash SHA256 Wheel py3
oriole-service-17.2.0.tar.gz (324.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page