{"id":13814361,"url":"https://github.com/benoitc/flower","last_synced_at":"2025-03-17T06:31:45.474Z","repository":{"id":4512194,"uuid":"5651915","full_name":"benoitc/flower","owner":"benoitc","description":"collection of modules to build distributed and reliable concurrent systems in Python.","archived":false,"fork":false,"pushed_at":"2013-09-14T08:00:58.000Z","size":450,"stargazers_count":205,"open_issues_count":0,"forks_count":5,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-03-16T09:06:23.065Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benoitc.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-09-02T21:10:55.000Z","updated_at":"2025-03-04T11:19:03.000Z","dependencies_parsed_at":"2022-09-15T17:40:24.149Z","dependency_job_id":null,"html_url":"https://github.com/benoitc/flower","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoitc%2Fflower","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoitc%2Fflower/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoitc%2Fflower/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoitc%2Fflower/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benoitc","download_url":"https://codeload.github.com/benoitc/flower/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243986084,"owners_count":20379260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T04:01:55.060Z","updated_at":"2025-03-17T06:31:44.947Z","avatar_url":"https://github.com/benoitc.png","language":"Python","readme":"\n\n==========================================================================================\n\n\n\n\n**DEPPRECATED** Flower is now superseded by `Offset \u003chttp://github.com/benoitc/offset\u003e`_ .\n\n\n\n==========================================================================================\n\n\n\n\n\n\n\n\nFlower\n======\n\n.. image:: https://secure.travis-ci.org/benoitc/flower.png?branch=master\n    :target: http://travis-ci.org/benoitc/flower\n\ncollection of modules to build distributed and reliable concurrent\nsystems in Python.\n\n::\n\n    a = “”\n\n    def f():\n       print(a)\n\n    def hello():\n        a = \"hello, world\"\n        tasklet(f)()\n\nRequirements\n------------\n\n- Python from 2.6 to 3.x\n- A platform supported by `libuv \u003chttps://github.com/joyent/libuv\u003e`\n\nSimple example\n--------------\n\nA simple example showing how to create a simple echo server.\n\n.. code-block:: python\n\n    # Echo server program\n    from flower import tasklet, run\n    from flower.net import Listen\n\n\n    # handle the connection. It return data to the sender.\n    def handle_connection(conn):\n        while True:\n            data = conn.read()\n            if not data:\n                break\n\n            conn.write(data)\n\n\n    # Listen on tcp port 8000 on localhost\n    l = Listen(('127.0.0.1', 8000), \"tcp\")\n    try:\n        while True:\n            try:\n\n                # wait for new connections (it doesn't block other tasks)\n                conn, err = l.accept()\n\n                # Handle the connection in a new task.\n                # The loop then returns to accepting, so that\n                # multiple connections may be served concurrently.\n\n                t = tasklet(handle_connection)(conn)\n            except KeyboardInterrupt:\n                break\n    finally:\n        l.close()\n\n    run()\n\n\nAnd the echo client::\n\n    from flower import tasklet, run, schedule\n    from flower.net import Dial\n\n\n    # connect to the remote server\n    conn = Dial(\"tcp\", ('127.0.0.1', 8000))\n\n    # start to handle the connection\n    # we send a string to the server and fetch the\n    # response back\n\n    for i in range(3):\n        msg = \"hello\"\n        print(\"sent %s\" % msg)\n        resp = conn.write(msg)\n        ret = conn.read()\n        print(\"echo: %s\" % ret)\n\n    conn.close()\n    run()\n\n\nInstallation\n------------\n\nFlower requires Python superior to 2.6 (yes Python 3 is supported)\n\nTo install flower using pip you must make sure you have a\nrecent version of distribute installed::\n\n    $ curl -O http://python-distribute.org/distribute_setup.py\n    $ sudo python distribute_setup.py\n    $ easy_install pip\n\n\nFor now flower can only be installed from sources. To install or upgrade to the latest released version of flower::\n\n    $ git clone https://github.com/benoitc/flower.git\n    $ cd flower \u0026\u0026 pip install -r requirements.txt\n\nLicense\n-------\n\nflower is available in the public domain (see UNLICENSE). flower is also\noptionally available under the MIT License (see LICENSE), meant\nespecially for jurisdictions that do not recognize public domain\nworks.\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenoitc%2Fflower","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenoitc%2Fflower","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenoitc%2Fflower/lists"}