{ "info": { "author": "Andrea Bonomi", "author_email": "andrea.bonomi@gmail.com", "bugtrack_url": null, "classifiers": [ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Airflow AWS Cost Explorer Plugin\nA plugin for [Apache Airflow](https://github.com/apache/airflow) that allows\nyou to export [AWS Cost Explorer](https://aws.amazon.com/aws-cost-management/aws-cost-explorer/)\nas [S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html) metrics to\nlocal file or S3 in Parquet, JSON, or CSV format.\n\n### System Requirements\n\n* Airflow Versions\n * 1.10.3 or newer\n* pyarrow or fastparquet (optional, for writing Parquet files)\n\n### Deployment Instructions\n\n1. Install the plugin\n\n pip install airflow-aws-cost-explorer\n\n2. Optional for writing Parquet files - Install pyarrow or fastparquet\n\n pip install pyarrow\n\n or\n\n pip install fastparquet\n\n2. Restart the Airflow Web Server\n\n3. Configure the AWS connection (Conn type = 'aws')\n\n4. Optional for S3 - Configure the S3 connection (Conn type = 's3')\n\n## Operators\n\n### AWSCostExplorerToS3Operator\n```AWS Cost Explorer to S3 Operator\n\n :param day: Date to be exported as string in YYYY-MM-DD format or date/datetime instance (default: yesterday)\n :type day: str, date or datetime\n :param aws_conn_id: Cost Explorer AWS connection id (default: aws_default)\n :type aws_conn_id: str\n :param region_name: Cost Explorer AWS Region\n :type region_name: str\n :param s3_conn_id: Destination S3 connection id (default: s3_default)\n :type s3_conn_id: str\n :param s3_bucket: Destination S3 bucket\n :type s3_bucket: str\n :param s3_key: Destination S3 key\n :type s3_key: str\n :param file_format: Destination file format (parquet, json or csv default: parquet)\n :type file_format: str or FileFormat\n :param metrics: Metrics (default: UnblendedCost, BlendedCost)\n :type metrics: list\n\n```\n\n### AWSCostExplorerToLocalFileOperator\n```AWS Cost Explorer to local file Operator\n\n :param day: Date to be exported as string in YYYY-MM-DD format or date/datetime instance (default: yesterday)\n :type day: str, date or datetime\n :param aws_conn_id: Cost Explorer AWS connection id (default: aws_default)\n :type aws_conn_id: str\n :param region_name: Cost Explorer AWS Region\n :type region_name: str\n :param destination: Destination file complete path\n :type destination: str\n :param file_format: Destination file format (parquet, json or csv default: parquet)\n :type file_format: str or FileFormat\n :param metrics: Metrics (default: UnblendedCost, BlendedCost)\n :type metrics: list\n\n```\n\n### AWSBucketSizeToS3Operator\n```AWS Bucket Size to S3 Operator\n\n :param day: Date to be exported as string in YYYY-MM-DD format or date/datetime instance (default: yesterday)\n :type day: str, date or datetime\n :param aws_conn_id: Cost Explorer AWS connection id (default: aws_default)\n :type aws_conn_id: str\n :param region_name: Cost Explorer AWS Region\n :type region_name: str\n :param s3_conn_id: Destination S3 connection id (default: s3_default)\n :type s3_conn_id: str\n :param s3_bucket: Destination S3 bucket\n :type s3_bucket: str\n :param s3_key: Destination S3 key\n :type s3_key: str\n :param file_format: Destination file format (parquet, json or csv default: parquet)\n :type file_format: str or FileFormat\n :param metrics: Metrics (default: bucket_size, number_of_objects)\n :type metrics: list\n\n```\n\n### AWSBucketSizeToLocalFileOperator\n```AWS Bucket Size to local file Operator\n\n :param day: Date to be exported as string in YYYY-MM-DD format or date/datetime instance (default: yesterday)\n :type day: str, date or datetime\n :param aws_conn_id: Cost Explorer AWS connection id (default: aws_default)\n :type aws_conn_id: str\n :param region_name: Cost Explorer AWS Region\n :type region_name: str\n :param destination: Destination file complete path\n :type destination: str\n :param file_format: Destination file format (parquet, json or csv default: parquet)\n :type file_format: str or FileFormat\n :param metrics: Metrics (default: bucket_size, number_of_objects)\n :type metrics: list\n\n```\n\n### Example\n\n```\n #!/usr/bin/env python\n import airflow\n from airflow import DAG\n from airflow_aws_cost_explorer import AWSCostExplorerToLocalFileOperator\n from datetime import timedelta\n\n default_args = {\n 'owner': 'airflow',\n 'depends_on_past': False,\n 'start_date': airflow.utils.dates.days_ago(1),\n 'email': ['airflow@example.com'],\n 'email_on_failure': False,\n 'email_on_retry': False,\n 'retries': 1,\n 'retry_delay': timedelta(minutes=30)\n }\n\n dag = DAG('cost_explorer',\n default_args=default_args,\n schedule_interval=None,\n concurrency=1,\n max_active_runs=1,\n catchup=False\n )\n\n aws_cost_explorer_to_file = AWSCostExplorerToLocalFileOperator(\n task_id='aws_cost_explorer_to_file',\n day='{{ yesterday_ds }}',\n destination='/tmp/{{ yesterday_ds }}.parquet',\n file_format='parquet',\n dag=dag)\n\n if __name__ == \"__main__\":\n dag.cli()\n```\n\n### Links\n\n* Apache Airflow - https://github.com/apache/airflow\n* Apache Arrow - https://github.com/apache/arrow\n* fastparquet - https://github.com/dask/fastparquet\n* AWS Cost Explorer - https://aws.amazon.com/aws-cost-management/aws-cost-explorer/ [API Reference](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_GetCostAndUsage.html)\n* S3 CloudWatch Metrics - https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/andreax79/airflow-aws-cost-explorer", "keywords": "", "license": "Apache License, Version 2.0", "maintainer": "", "maintainer_email": "", "name": "airflow-aws-cost-explorer", "package_url": "https://pypi.org/project/airflow-aws-cost-explorer/", "platform": "", "project_url": "https://pypi.org/project/airflow-aws-cost-explorer/", "project_urls": { "Homepage": "https://github.com/andreax79/airflow-aws-cost-explorer" }, "release_url": "https://pypi.org/project/airflow-aws-cost-explorer/1.3.0/", "requires_dist": [ "apache-airflow" ], "requires_python": "", "summary": "Apache Airflow Operator exporting AWS Cost Explorer data to local file or S3", "version": "1.3.0", "yanked": false, "yanked_reason": null }, "last_serial": 6007831, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "bb43064082a28c1cd3e4c51bde956e33", "sha256": "fb48fe08d9cf4703c1f03d55a9532956ad5ceee884848a680ec954589fd4e4f8" }, "downloads": -1, "filename": "airflow_aws_cost_explorer-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bb43064082a28c1cd3e4c51bde956e33", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11183, "upload_time": "2019-10-08T14:54:17", "upload_time_iso_8601": "2019-10-08T14:54:17.589734Z", "url": "https://files.pythonhosted.org/packages/2b/71/6659c923ea94891af82a310fcd15cdab6abc974a25f96bbb3c979d33eb7a/airflow_aws_cost_explorer-1.0.0-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "67f84673ac227272c2aaae37093ce1d5", "sha256": "d45f02d25917a2a7e18c7323b59d8492418d687a8ebd92abad75ced44e71ff9a" }, "downloads": -1, "filename": "airflow_aws_cost_explorer-1.0.0.tar.gz", "has_sig": false, "md5_digest": "67f84673ac227272c2aaae37093ce1d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5448, "upload_time": "2019-10-08T14:54:21", "upload_time_iso_8601": "2019-10-08T14:54:21.315639Z", "url": "https://files.pythonhosted.org/packages/d2/4f/f56899f04f58142a1a437e83e11e5cbebb7fd24f7c7deef4d204b35f41ff/airflow_aws_cost_explorer-1.0.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "ca1f2792e2d3b8c8e38d2e011c3a9792", "sha256": "e09532e77fb8855e58784514b42980b62f971e28a64a3c3aa1ecdb42e8429ad3" }, "downloads": -1, "filename": "airflow_aws_cost_explorer-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ca1f2792e2d3b8c8e38d2e011c3a9792", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11251, "upload_time": "2019-10-08T15:23:04", "upload_time_iso_8601": "2019-10-08T15:23:04.966802Z", "url": "https://files.pythonhosted.org/packages/81/5e/3e183f6d622d0391ec3c647661abe28bcf47d2c96b9312ef725cc202287a/airflow_aws_cost_explorer-1.0.1-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "144f9a04c953c9504f54eaea4931de13", "sha256": "3981f0cd614bea23d66b2508321effd9b39d7cc6fd49b859cac08efa3ad67c33" }, "downloads": -1, "filename": "airflow_aws_cost_explorer-1.0.1.tar.gz", "has_sig": false, "md5_digest": "144f9a04c953c9504f54eaea4931de13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5487, "upload_time": "2019-10-08T15:23:15", "upload_time_iso_8601": "2019-10-08T15:23:15.170796Z", "url": "https://files.pythonhosted.org/packages/4d/de/888de8d198c78e249526f1789d9cc922d7ba01628668adf91c0518a34d6e/airflow_aws_cost_explorer-1.0.1.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "93a9cd1d6bfdfc1e214116568e5047fa", "sha256": "8e9890b84a70e57b3dcde60c85c5624072370c8e5be869bbd6322ca47970dd03" }, "downloads": -1, "filename": "airflow_aws_cost_explorer-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "93a9cd1d6bfdfc1e214116568e5047fa", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11288, "upload_time": "2019-10-09T09:06:21", "upload_time_iso_8601": "2019-10-09T09:06:21.194785Z", "url": "https://files.pythonhosted.org/packages/8c/c4/cf7ca8b15450d3b1f322d2a86646fb936862fccb6cb499b9030f59b9a6b2/airflow_aws_cost_explorer-1.0.2-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "4bf57d22b4e2ea6ec10f5279cc42ee6b", "sha256": "89ae3d00cd124a2ccedb8f9207458aae0afbd343528a2838d502a94ba9548a39" }, "downloads": -1, "filename": "airflow_aws_cost_explorer-1.0.2.tar.gz", "has_sig": false, "md5_digest": "4bf57d22b4e2ea6ec10f5279cc42ee6b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5535, "upload_time": "2019-10-09T09:06:23", "upload_time_iso_8601": "2019-10-09T09:06:23.382796Z", "url": "https://files.pythonhosted.org/packages/4b/51/19cff6b1962f15b6cb8fad4fd50245c187a50671cd65955c181324e55e0f/airflow_aws_cost_explorer-1.0.2.tar.gz", "yanked": false, "yanked_reason": null } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "7f057925c8c2f5392814f3708654a2b9", "sha256": "ff38466d957a09cc278d7e67c002079bfe67115fcecfddbf8c21f98661f97a61" }, "downloads": -1, "filename": "airflow_aws_cost_explorer-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7f057925c8c2f5392814f3708654a2b9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11550, "upload_time": "2019-10-09T13:22:48", "upload_time_iso_8601": "2019-10-09T13:22:48.014570Z", "url": "https://files.pythonhosted.org/packages/f9/7e/4e929882218bcfb2913be5011d912a1a9e7fbe84250e59626d061c314fb4/airflow_aws_cost_explorer-1.1.0-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "63a44c3cde773d1f587570e8fd5b0daf", "sha256": "ac67a3a4f29c4fccf074c2af39d605b249a9648346c91a3e53a93a8cb4a549d3" }, "downloads": -1, "filename": "airflow_aws_cost_explorer-1.1.0.tar.gz", "has_sig": false, "md5_digest": "63a44c3cde773d1f587570e8fd5b0daf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5766, "upload_time": "2019-10-09T13:22:49", "upload_time_iso_8601": "2019-10-09T13:22:49.742798Z", "url": "https://files.pythonhosted.org/packages/86/39/a86b36f432b92028cb6ae0219094262c0a13324cd14aa5d3b87bf91eb746/airflow_aws_cost_explorer-1.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "98dccf817fce780fb9ff1d4b79b59e8e", "sha256": "96b2e9bdb2461961120c211b1b99a7ec99feaea78cc8c23c821706082829b22a" }, "downloads": -1, "filename": "airflow_aws_cost_explorer-1.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "98dccf817fce780fb9ff1d4b79b59e8e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11828, "upload_time": "2019-10-11T11:50:17", "upload_time_iso_8601": "2019-10-11T11:50:17.708635Z", "url": "https://files.pythonhosted.org/packages/ee/13/bac850be90c589285e4f1571d7808a81d9750f6d3316d3b035f2b370dfe4/airflow_aws_cost_explorer-1.1.1-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "c1327555e991656bfdb38c804c430052", "sha256": "7be520e1cea912c4afae2c5b084b50f11cac33e614df8975b201a86b707a4eb7" }, "downloads": -1, "filename": "airflow_aws_cost_explorer-1.1.1.tar.gz", "has_sig": false, "md5_digest": "c1327555e991656bfdb38c804c430052", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6092, "upload_time": "2019-10-11T11:50:19", "upload_time_iso_8601": "2019-10-11T11:50:19.542103Z", "url": "https://files.pythonhosted.org/packages/6c/55/934b3c380bdda5bdbc1ff867b909db6bd7400af17bf91eb15848a0d3cf03/airflow_aws_cost_explorer-1.1.1.tar.gz", "yanked": false, "yanked_reason": null } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "c7ca2c4d956e31adfa325f402783482c", "sha256": "9c1967e8c7bb59e5f9362da3ea8456c68a99702853c9ee81a99154c24880c12e" }, "downloads": -1, "filename": "airflow_aws_cost_explorer-1.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c7ca2c4d956e31adfa325f402783482c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15489, "upload_time": "2019-10-18T14:21:25", "upload_time_iso_8601": "2019-10-18T14:21:25.328198Z", "url": "https://files.pythonhosted.org/packages/5c/0b/93dd25e2343e68e513c3701022d14b8fc979cf85bea31423414517ea23f0/airflow_aws_cost_explorer-1.2.0-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "661fa9646f42d7d20f1c9d3b7fb938d8", "sha256": "292959d7c0d06b39080c53b25fa1e74f93f287a7f03fe413993a3b1eb3f31303" }, "downloads": -1, "filename": "airflow_aws_cost_explorer-1.2.0.tar.gz", "has_sig": false, "md5_digest": "661fa9646f42d7d20f1c9d3b7fb938d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8236, "upload_time": "2019-10-18T14:21:27", "upload_time_iso_8601": "2019-10-18T14:21:27.067161Z", "url": "https://files.pythonhosted.org/packages/be/23/f4e46338e7061255bb71a0949048a0c7b9b9a5bf5b31b6dbfc9587668dd1/airflow_aws_cost_explorer-1.2.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "92ece09f957b85244350b7815809d8e7", "sha256": "d3896bc7c56e3d2db9181eb75de188edf049aa1185e1aaba5a2018523634fa0a" }, "downloads": -1, "filename": "airflow_aws_cost_explorer-1.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "92ece09f957b85244350b7815809d8e7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16267, "upload_time": "2019-10-21T15:17:28", "upload_time_iso_8601": "2019-10-21T15:17:28.698784Z", "url": "https://files.pythonhosted.org/packages/0e/8d/4e753a4eb62965033e9db19757e23832ee10db8d41c1bc0a92cd6a366ad2/airflow_aws_cost_explorer-1.3.0-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "65790ef4f949c6905357d272adcfd81c", "sha256": "de2eb066725bcf940295ab00b37ab846e2329526f2415f95a667217bade490ef" }, "downloads": -1, "filename": "airflow_aws_cost_explorer-1.3.0.tar.gz", "has_sig": false, "md5_digest": "65790ef4f949c6905357d272adcfd81c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9071, "upload_time": "2019-10-21T15:17:33", "upload_time_iso_8601": "2019-10-21T15:17:33.489875Z", "url": "https://files.pythonhosted.org/packages/68/d9/b35438627532ee3f8e7307b553e30056ea6a967605298c65f0b980a8d87c/airflow_aws_cost_explorer-1.3.0.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "92ece09f957b85244350b7815809d8e7", "sha256": "d3896bc7c56e3d2db9181eb75de188edf049aa1185e1aaba5a2018523634fa0a" }, "downloads": -1, "filename": "airflow_aws_cost_explorer-1.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "92ece09f957b85244350b7815809d8e7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16267, "upload_time": "2019-10-21T15:17:28", "upload_time_iso_8601": "2019-10-21T15:17:28.698784Z", "url": "https://files.pythonhosted.org/packages/0e/8d/4e753a4eb62965033e9db19757e23832ee10db8d41c1bc0a92cd6a366ad2/airflow_aws_cost_explorer-1.3.0-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "65790ef4f949c6905357d272adcfd81c", "sha256": "de2eb066725bcf940295ab00b37ab846e2329526f2415f95a667217bade490ef" }, "downloads": -1, "filename": "airflow_aws_cost_explorer-1.3.0.tar.gz", "has_sig": false, "md5_digest": "65790ef4f949c6905357d272adcfd81c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9071, "upload_time": "2019-10-21T15:17:33", "upload_time_iso_8601": "2019-10-21T15:17:33.489875Z", "url": "https://files.pythonhosted.org/packages/68/d9/b35438627532ee3f8e7307b553e30056ea6a967605298c65f0b980a8d87c/airflow_aws_cost_explorer-1.3.0.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }