Skip to main content

Rapidly create services.

Project description

【Chinese readme】

【English readme】

The Zen of oriole: speed defines the winner.

Prerequisites

  1. Install following packages

  • mongodb

  • mysql

  • rabbitmq

  • redis

  • python3.6

  • libpython3.6

In ubuntu, you can use apt-get to install. Python3.6 and libpython3.6 have been installed in Ubuntu >= 18.04.

  1. Install oriole-service

pip install oriole-service

Add services.cfg

AMQP_URI:      pyamqp://test:test@127.0.0.1
database:      mysql://test:test@127.0.0.1/test?charset=utf8
test_database: mysql://test:test@127.0.0.1/test?charset=utf8
datasets:      redis://127.0.0.1

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

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

o r log

monitor

o s

image0

document

o d

check

Run o s to do the same thing.

image1

Create docker image

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

Create log_service image.

o b log

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

oriole_service-28.1.0-py3-none-any.whl (8.3 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page