semvec/pypi-packages huggingface dataset:
py-rmq 0.0.5
Python ali rocketMQ api
License: MIT License
Requires Python: >=3.6.0

# ali rocketMQ for python

## 说明

官方so路径要加到LD_LIBRARY_PATH中

## 调用示例

```python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author  : HaiFeng
# @Email   : 24918700@qq.com
# @Time    : 2019/1/16
# @desc    : demo ali rocketmq

import sys
import time
from py_rmq.rmq_consumer import Consumer
from py_rmq.rmq_producer import Producer
from py_rmq.rmq_consumer import OrderConsumer
from py_rmq.rmq_producer import OrderProducer

def OnConsumer(topic: str, tag: str, key: str, id: str, deliver_time: int, body: str, reconsume_times: int, store_time: int, offset: int):
    print(body)


if __name__ == '__main__':

    t:str = ''
    id:str = ''
    access:str = ''
    secret:str = ''
    topic:str = ''

    if len(sys.argv) > 1:
        t = sys.argv[1].lower()
        if len(sys.argv) > 2:
            id = sys.argv[2]
            if len(sys.argv) > 3:
                access = sys.argv[3]
                if len(sys.argv) > 4:
                    secret = sys.argv[4]
                    if len(sys.argv) > 5:
                        topic = sys.argv[5]
    if t == '':
        t = input('select consumer or producer:').lower()
    if id == '':
        id = input('input cid or pid:')
    if access == '':
        access = input('input acces key:')
    if secret == '':
        secret = input('input secret key:')
    if topic == '':
        topic = input('input topic:')
    if t == 'consumer':
        print('test consumer...')
        c = Consumer(id, access, secret)
        c.OnConsumer = OnConsumer
        c.subscribe(topic, '*')
        input('press enter to continue test order consumer')
        c.close()

        print('test order consumer...')
        c = OrderConsumer(id, access, secret)
        c.OnConsumer = OnConsumer
        c.subscribe(topic, '*')
        input('press enter exit')
        c.close()
    else:
        tag = 'tag test'

        key = time.strftime('%Y%m%d%H%M%S', time.localtime())

        print('test producer...')
        p = Producer(id, access, secret)
        msg = input('input content: ')
        rst = p.send_msg(topic, tag, key, msg)
        print(f'result: {rst}')
        print('test delive msg, delive 30s')
        rst = p.send_msg(topic, tag, key, msg + 'delive', int(time.time() * 1000) + 30000)
        print(f'delive msg result: {rst}')
        p.close()

        input('press enter continue test order producer')
        p = OrderProducer(id, access, secret)
        sharding_key = input('input sharding_key: ')
        rst = p.send_msg(topic, tag, key, msg, sharding_key)
        print(f'order msg result: {rst}')
        p.close()
```
flake8-illegal-import 0.1.0
illegal import detector, plugin for flake8
License: MIT License
Keywords: flake8 import reject

Illegal import checker
===============================

.. image:: https://travis-ci.com/bagerard/flake8-illegal-import.svg?branch=master
   :alt: Build Status
   :target: https://travis-ci.com/bagerard/flake8-illegal-import

.. image:: http://codecov.io/github/bagerard/flake8-illegal-import/coverage.svg?branch=master
   :alt: Coverage Status
   :target: http://codecov.io/github/bagerard/flake8-illegal-import?branch=master

An extension for `Flake8 <https://pypi.python.org/pypi/flake8>`_ to make sure
that certain packages aren't imported in a directory


Plugin for Flake8
-----------------

When both Flake8 and ``flake8-illegal-import`` are installed, the plugin
is available in ``flake8``::

  $ flake8 --version
  3.6.0 (flake8-illegal-import: 0.1.0, […]


Parameters
----------

This module requires 2 parameters:
--illegal-import-dir={path}
--illegal-import-packages={pkg1},{pkg2}

E.g usage::

  $ flake8 ./sample.py --illegal-import-dir=./ --illegal-import-packages=os --select=II101

>>/home/.../test/sample.py:14:1: II101 importing this package is forbidden in this directory (os)


Error codes
-----------

This plugin is using the following error codes:

+---------------------------------------------------------------------+
| Presence of forbidden imports                                       |
+-------+-------------------------------------------------------------+
| II101 | importing this package is forbidden in this directory {pkg} |
+-------+-------------------------------------------------------------+


Operation
---------

The plugin will go through all imports and find out if forbidden packages
are imported in the given directory


Changes
-------

0.1.0 - 2019-01-XX
``````````````````
* Initial release