# -*- coding: utf-8 -*-
from setuptools import setup

package_dir = \
{'': 'src'}

packages = \
['flyingcircus',
 'flyingcircus._raw',
 'flyingcircus.recipes',
 'flyingcircus.service']

package_data = \
{'': ['*']}

install_requires = \
['PyYAML>=5.1.1,<5.2.0', 'attrs>=18.2.0,<19.0.0', 'inflection>=0.3.1,<0.4.0']

setup_kwargs = {
    'name': 'flying-circus',
    'version': '0.7.3',
    'description': 'A tool for describing AWS infrastructure as code',
    'long_description': '[![PyPI release](https://img.shields.io/pypi/v/flying-circus.svg)](https://pypi.python.org/pypi/flying-circus)\n[![Python versions](https://img.shields.io/pypi/pyversions/flying-circus.svg)](https://pypi.python.org/pypi/flying-circus)\n[![Build Status](https://dev.azure.com/garyd203/flying-circus/_apis/build/status/garyd203.flying-circus?branchName=master)](https://dev.azure.com/garyd203/flying-circus/_build/latest?definitionId=1&branchName=master)\n[![Documentation Status](https://readthedocs.org/projects/flying-circus/badge/?version=latest)](http://flying-circus.readthedocs.io/en/latest/?badge=latest)\n[![Downloads](https://img.shields.io/pypi/dm/flying-circus.svg)](https://pypi.python.org/pypi/flying-circus)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\n# flying-circus\n\nFlying Circus is a tool for describing AWS infrastructure as code (using\nPython). It uses the same data structures as the AWS Cloud Formation service,\nexcept described as Python objects instead of the usual YAML. The Python\nprogram generates a YAML template, which is passed across to Cloud Formation\nin the usual manner.\n\nIt is a bit unusual to use a full programming language to describe\ninfrastructure, instead of a static configuration file like many of us are\nused to (whether or not we also utilise a templating tool).\nWe hope that the Flying Circus library can empower DevOps folk by unlocking\nsome of the techniques that are available for software code, like named\nvariables and techniques to structure code independently of the output format,\nlibraries to allow code re-use with versioning, automated refactoring tools\nand so on.\n\nYou can learn how to use Flying Circus yourself by reading the\n[documentation](https://flying-circus.readthedocs.io/)\n\n# Installation\n\nInstall Flying Circus through the Python packaging system:\n\n```bash\npip install flying-circus\n```\n\nMany people also use the Amazon Web Services command line tools to deploy\ntheir CloudFormation stacks. If you want this, a good way to install an\nup-to-date version is also with `pip`:\n\n```bash\n# Optional\npip install awscli\n```\n\n# Example\n\nHere is a simple example of how you can use Flying Circus to describe some EC2\ninstances and deploy them using the AWS CloudFormation service.\n\nFirst, create a python script (called `my_ec2_stack.py` in this case) to\ndescribe your infrastructure. Any valid Python can be used to create the\nFlying Circus objects, along with any valid CloudFormation properties and\nattributes.\n\nThis example is intentionally simplistic - it just creates two EC2 instances\nwith varying configuration, and outputs the internal IP for one. However, it\ndoes hint at some of the more complex and powerful usage patterns.\n\n```python\nimport os\n\nfrom flyingcircus.core import Stack, Output\nfrom flyingcircus.intrinsic_function import GetAtt\nfrom flyingcircus.service.ec2 import *\n\n\ndef create_ec2_instance(name, instance_type="t2.micro"):\n    instance = Instance(Properties=InstanceProperties(\n        ImageId="ami-942dd1f6",\n        InstanceType=instance_type,\n        Monitoring=False,\n    ))\n    instance.name = name\n    return instance\n\n\nif __name__ == "__main__":\n    stack = Stack()\n\n    stack.Resources["WebServer"] = create_ec2_instance("webserver")\n    stack.Resources["DatabaseServer"] = dbserver = create_ec2_instance("dbserver", "t2.medium")\n    dbserver.DeletionPolicy = "Retain"\n\n    stack.Outputs["DatabaseServerIp"] = Output(\n        Description=f"Internal IP address for the database server",\n        Value=GetAtt(dbserver, "PrivateIp"),\n    )\n\n    stack.tag(application="api-service", environment="test", owner=os.environ.get("USER"))\n\n    print(stack.export("yaml"))\n```\n\nNow generate CloudFormation YAML from your Python script. Note that the result\nwill *always* be valid well-formatted YAML, and internal checks mean that it\nis also difficult to generate invalid CloudFormation.\n\nFinally, use the AWS command line tools to create/update a stack and it\'s\nassociated resources.\n\n```bash\npython my_ec2_stack.py > my_ec2_stack.yaml\naws cloudformation deploy --stack-name demo-flying-circus-ec2 --template-file my_ec2_stack.yaml\n```\n\nYou could do these steps in your Continuous Integration server ;-)\n\n# Is/Is Not\n\nThere\'s a lot of tools for managing Infrastructure as Code, often with subtle\ndifferences and passionate advocates. A quick discussion of our scope may\nhelp you understand where Flying Circus fits into this ecosystem, and whether it can\nhelp you. This is presented in the simple "Is/Is Not" format.\n\n## Flying Circus Is...\n\n* ...a Pythonic DSL for writing fully featured Python code\n* ...for Amazon Web Services infrastructure\n* ...built on top of AWS [Cloud Formation templates](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-guide.html)\n* ...a generator that always produces valid, consistent, human-readable, good-practice YAML\n\n## Flying Circus Is Not...\n\n* ...YAML or JSON. It\'s Python.\n* ...a tool to make it easier to write YAML or JSON. You write Python, and YAML is an output format.\n* ...a DSL with a completely new syntax. You use normal Python syntax with all\n  of it\'s features and nothing changed.\n* ...a templating language, like Jinja2.\n* ...a template management tool, like Ansible.\n* ...an independent implementation of infrastructure management, like AWS\n  Cloud Formation stacks, or Terraform.\n* ...a cloud-agnostic abstraction layer.\n* ...multi-cloud - although it could become this in the future.\n  The current implementation is focused on representing AWS infrastructure\n  using the CloudFormation data model. Other cloud providers have similar\n  native data models, so it is feasible that we could re-use the concepts and\n  tooling to support Google Cloud Platform, etc.\n* ...a tool for interacting with the Cloud Formation service. There\n  are other tools that can do this for you (such as boto3 or the AWS CLI,\n  for starters)\n* ...a validation tool - although it could become this in the future, and\n  already has elements of validation as a by-product of presenting a helpful\n  interface to users.\n\n# Sounds Great, Can I Use It?\n\nSure, of course you can. The [documentation will get you started](https://flying-circus.readthedocs.io/en/latest/getting_started.html).\n\nFlying Circus is currently in **Beta**. This means it is expected\nto work for the supported AWS services, and is in use by real customers.\nHowever, the details of the interface and implementation are still being\nvalidated and may change drastically.\n\n# How Do I Help?\n\nJust use it!\n',
    'author': 'Gary Donovan',
    'author_email': 'gazza@gazza.id.au',
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://github.com/garyd203/flying-circus',
    'package_dir': package_dir,
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'python_requires': '>=3.6,<4.0',
}


setup(**setup_kwargs)
