.. role:: bash(code)
:language: bash
.. role:: python(code)
:language: python
=============
pycontextfree
=============
.. image:: https://api.travis-ci.org/undertherain/pycontextfree.svg?branch=master
:target: https://travis-ci.org/undertherain/pycontextfree
:alt: build status from Travis CI
.. image:: https://coveralls.io/repos/github/undertherain/pycontextfree/badge.svg?branch=master
:target: https://coveralls.io/github/undertherain/pycontextfree?branch=master
.. image:: https://badge.fury.io/py/contextfree.svg
:target: https://badge.fury.io/py/contextfree
:alt: pypi version
`CFDG
<https://www.contextfreeart.org/>`_-inspired cairo-based pythonic generative art tool
Here is an example of simple code producing stochastic fractal tree:
.. code:: python
from contextfree.contextfree import *
@check_limits
def branch():
line(0,1)
with translate(0,0.9):
with scale(0.7 + rnd(0.15)):
with color(alpha=0.95):
with rotate(-0.3 + rnd(0.3)):
branch()
with rotate(0.3 + rnd(0.3)):
branch()
init(canvas_size=(300,300), background_color="#FFFFFF")
with scale(3):
branch()
display_ipython()
Here is the output:
.. image:: https://user-images.githubusercontent.com/1635907/30413703-9e585f54-995a-11e7-8566-bdded386be8d.png
:alt: [tree_example]
:align: center
Check examples folder for more fun stuff.
How do I get set up?
--------------------
* ``pip3 install contextfree`` for latest stable release
* ``pip3 install git+https://github.com/undertherain/pycontextfree.git`` for recent development version
* Python 3.6 or later is required
Raw data
{
"_id": null,
"home_page": "https://github.com/undertherain/pycontextfree",
"name": "contextfree",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": null,
"keywords": "generative, art, graphics",
"author": null,
"author_email": null,
"download_url": null,
"platform": null,
"description": ".. role:: bash(code)\n :language: bash\n\n.. role:: python(code)\n :language: python\n\n=============\npycontextfree\n=============\n\n.. image:: https://api.travis-ci.org/undertherain/pycontextfree.svg?branch=master\n :target: https://travis-ci.org/undertherain/pycontextfree\n :alt: build status from Travis CI\n\n.. image:: https://coveralls.io/repos/github/undertherain/pycontextfree/badge.svg?branch=master\n :target: https://coveralls.io/github/undertherain/pycontextfree?branch=master\n\n.. image:: https://badge.fury.io/py/contextfree.svg\n :target: https://badge.fury.io/py/contextfree\n :alt: pypi version\n\n`CFDG\n<https://www.contextfreeart.org/>`_-inspired cairo-based pythonic generative art tool\n\nHere is an example of simple code producing stochastic fractal tree:\n\n.. code:: python\n\n from contextfree.contextfree import *\n \n @check_limits\n def branch():\n line(0,1)\n with translate(0,0.9):\n with scale(0.7 + rnd(0.15)):\n with color(alpha=0.95):\n with rotate(-0.3 + rnd(0.3)):\n branch()\n with rotate(0.3 + rnd(0.3)):\n branch()\n\n init(canvas_size=(300,300), background_color=\"#FFFFFF\")\n with scale(3):\n branch()\n \n display_ipython()\n\nHere is the output:\n\n.. image:: https://user-images.githubusercontent.com/1635907/30413703-9e585f54-995a-11e7-8566-bdded386be8d.png\n :alt: [tree_example]\n :align: center\n\nCheck examples folder for more fun stuff. \n\nHow do I get set up?\n--------------------\n\n* ``pip3 install contextfree`` for latest stable release\n* ``pip3 install git+https://github.com/undertherain/pycontextfree.git`` for recent development version\n* Python 3.6 or later is required\n\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "cfdg-inspired cairo-based pythonic generative art framework",
"version": "0.3.7",
"project_urls": {
"Homepage": "https://github.com/undertherain/pycontextfree"
},
"split_keywords": [
"generative",
" art",
" graphics"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "137a4cd7cdb964e0eace3e51e85e2bf21dc14fd2bb151b379af061c14323f3fc",
"md5": "9eeeb3e5290e8d4621ce329cfe7ee891",
"sha256": "f0fa28ee162205f5ec4a7fa9f9adea64c2e16e1a73be02566bed67986f396886"
},
"downloads": -1,
"filename": "contextfree-0.3.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9eeeb3e5290e8d4621ce329cfe7ee891",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.5",
"size": 13831,
"upload_time": "2024-03-30T06:07:44",
"upload_time_iso_8601": "2024-03-30T06:07:44.487054Z",
"url": "https://files.pythonhosted.org/packages/13/7a/4cd7cdb964e0eace3e51e85e2bf21dc14fd2bb151b379af061c14323f3fc/contextfree-0.3.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-30 06:07:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "undertherain",
"github_project": "pycontextfree",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "cairocffi",
"specs": []
},
{
"name": "numpy",
"specs": []
}
],
"test_requirements": [],
"lcname": "contextfree"
}