{ "info": { "author": "Bryson Tyrrell", "author_email": "bryson.tyrrell@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Build Tools" ], "description": "Possum\n======\n\n*Python AWS SAM* --> *PyAWSSAM* --> *Pawssam* --> **Possum**\n\nInstall\n-------\n\nPossum can be installed from the Python Package Index:\n\n::\n\n $ pip install possum\n\nPossum requires **Python 3.6+** and **pipenv** (*pipenv* must be installed\nseparately and is not installed with Possum).\n\nAbout\n-----\n\nPossum is a packaging tool for serverless Python-based applications\nusing the AWS Serverless Application Model (AWS SAM).\n\nThe ``sam package`` or ``aws cloudformation package`` options have a\nlimitation when it comes to Python Lambda functions: they have no means\nof packaging external dependencies. This means that developers are\nalways on their own for creating those Lambda artifacts, uploading them\nto S3, and deploying.\n\nPossum aims to serve as a replacement to the basic package functions.\nThe tool is based upon my approach to serverless AWS applications\n(opinionated) and may not be a fit for all parties.\n\nAWS Credentials\n---------------\n\nPossum uses the Boto3 SDK for uploading artifacts to S3. You can set your\nAWS access and secret keys in your environment variables as described in\nthe Boto3 documentation. Possom also accept a profile name for your AWS\ncredentials file via the ``-p/--profile`` argument.\n\n::\n\n $ possum '' --profile ''\n\nBasic Usage\n-----------\n\nRun Possum from the repository directory containing the serverless\napplication.\n\n::\n\n $ possum ''\n\nThe above command will package the Python Lambda functions and upload\nthem to S3 assuming the template file is named ``template.yaml``. You\ncan specify the template's name with the ``-t/--template`` argument:\n\n::\n\n $ possum '' -t my-template.yml\n\nThe generated deployment template will printed on the screen.\n\nBy default, Possum will upload *new* artifacts to a directory in your chosen S3\nbucket named ``possum-0123456789`` where the numerical value is the current\ntimestamp.\n\nIf you wish to override this default and specify the directory path to upload\nnew artifact, append it to the S3 bucket name using forward slashes:\n\n::\n\n $ possum '/'\n\nYou can also specify the deployment template be written to a file by\npassing a name to the ``-o/--output-template`` argument:\n\n::\n\n $ possum '' -o deployment.yaml\n\nPossum uses hashes of your function directories to determine if changes have\noccurred since the last run of the command. Hashes and S3 URIs are saved in a\n``~/.possum`` directory for each project you package with Possum.\n\nTo force Possum to build all functions and skip the hash check, use the\n``-c/--clean`` argument.\n\nYou can view the options and instructions for using Possum with the\n``-h`` argument:\n\n::\n\n $ possum -h\n usage: possum [-h] [-t template] [-o output] [-p profile_name] [-c] [--docker]\n [--docker-image image_name] [-v]\n s3_bucket\n\n Possum is a utility to package Python-based serverless applications using the\n Amazon Serverless Application model with per-function dependencies.\n\n positional arguments:\n s3_bucket The S3 bucket to upload artifacts. You may optionally\n pass a path within the bucket to store the Lambda\n artifacts (defaults to 'possum-{timestamp}').\n\n optional arguments:\n -h, --help show this help message and exit\n -t template, --template template\n The filename of the SAM template.\n -o output, --output-template output\n Optional filename for the output template.\n -p profile_name, --profile profile_name\n Optional profile name for AWS credentials.\n -c, --clean Build all Lambda packages, ignoring previous run.\n --docker Build Lambda packages within a Docker container\n environment.\n --docker-image image_name\n Specify a Docker image to use (defaults to\n 'possum:latest').\n -v, --version Display version information.\n\nDocker Support\n--------------\n\nThe installation of some Python packages differ based on the underlying system\n(cryptography.io is an example). To ensure your installed dependencies are\nfully compatible with the Lambda environment, you may opt to run Possum within\na Docker container.\n\nThe included ``Dockerfile`` in this project will create a compatible default\nimage to use. Run the following command from the same directory as the\n``Dockerfile`` to build the image:\n\n::\n\n $ docker build . -t possum:latest\n\nThis image is based upon ``lambci/lambda:build-python3.6``. You may build your\nown custom image and specify it using the ``--docker-image`` argument. If you\ndecide to use your own image it must have ``pipenv`` and ``possum`` installed!\n\nLaunch Possum in a container using the ``--docker`` argument:\n\n::\n\n $ possum '' --docker\n\nServerless App Repository Example\n---------------------------------\n\nHere is an example of a serverless Python application with multiple Lambda\nfunctions in a single repository:\n\n::\n\n my_prjoect/\n |\n |___template.yaml\n |\n |___function1/\n | |\n | |___function1.py\n |\n |___function2/\n |\n |___function2.py\n |___Pipfile\n |___Pipfile.lock\n\nFor each AWS Lambda function defined in the template, Possum references\nthe ``Properties:CodeUri`` key for the path to the function's directory.\n\nPossum will display a warning if the function's ``Properties:Runtime``\nvalue does not match ``python*``. You will need to package these remaining\nfunctions separately.\n\nThe contents of each functions' directory will be copied to a temporary\nbuild directory. If a ``Pipfile``/``Pipfile.lock`` or ``requirements.txt``\nexist, the external packages will be installed into the build directory. The\nentire contents of the build directory will then be zipped into a deployable\nLambda artifact.\n\nAll artifacts will be uploaded to the provided S3 bucket. The imported\ntemplate will be updated with the S3 locations for each Lambda function\nand written ``stdout`` or a file if the ``-o`` argument was provided.\n\nThe generated deployment template can be used with ``sam deploy`` or\n``aws cloudformation deploy`` to deploy the application.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/brysontyrrell/Possum", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "possum", "package_url": "https://pypi.org/project/possum/", "platform": "", "project_url": "https://pypi.org/project/possum/", "project_urls": { "Homepage": "https://github.com/brysontyrrell/Possum" }, "release_url": "https://pypi.org/project/possum/1.4.4/", "requires_dist": null, "requires_python": "", "summary": "A packaging tool for Python AWS serverless applications.", "version": "1.4.4" }, "last_serial": 4443167, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "35a15ee7cbfce938765eec96cbf4838f", "sha256": "a60c2e07f4116783e08ccdf40c0584d4af69673f314a9f5755526523809234e6" }, "downloads": -1, "filename": "possum-1.0.tar.gz", "has_sig": false, "md5_digest": "35a15ee7cbfce938765eec96cbf4838f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5752, "upload_time": "2018-03-12T21:51:59", "url": "https://files.pythonhosted.org/packages/d7/ee/8f4b597414b51abb5f45ac71f41b471a7f1fc5b19ab73c72437b29b932f3/possum-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "27cdd179eca3b42d69327c67d08521e7", "sha256": "266a8ae29923abcfaf84ba511a86dfccbd07d6d052d067de10fee69e22dbbc88" }, "downloads": -1, "filename": "possum-1.1.tar.gz", "has_sig": false, "md5_digest": "27cdd179eca3b42d69327c67d08521e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6129, "upload_time": "2018-03-14T05:27:41", "url": "https://files.pythonhosted.org/packages/6b/e6/4e5806fe7f06d5f19bf05eeb18155c56b37947a48fcd458ea596d8b9cbe4/possum-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "b37b104ba5f445dd7963929fa4da4add", "sha256": "a46d44a9bbea5383da46fdda7bc8bec595ac86032de732ae76e3af566b3aa5c9" }, "downloads": -1, "filename": "possum-1.2.tar.gz", "has_sig": false, "md5_digest": "b37b104ba5f445dd7963929fa4da4add", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7302, "upload_time": "2018-04-07T04:23:08", "url": "https://files.pythonhosted.org/packages/88/7b/752618cea4d1c5bd0877a08284751a5b11d5bce35a8700e0cf13836c2778/possum-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "b75b58055740749b4d6ed7433a97d101", "sha256": "af0f917378e73c23ba76103a91bbd88a97cb6c1682055aac475eb43694a7feb2" }, "downloads": -1, "filename": "possum-1.3.tar.gz", "has_sig": false, "md5_digest": "b75b58055740749b4d6ed7433a97d101", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8615, "upload_time": "2018-06-02T02:10:14", "url": "https://files.pythonhosted.org/packages/b4/38/236961602cadd9f8c066775e33165e7445bcb0579d1de4b4f4363758c141/possum-1.3.tar.gz" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "6c6b1f0e5255552c7e77cc1df54e24b8", "sha256": "2de503a3f16fea22efe6445e930b36099d2a33481205542e24d452b173825a3d" }, "downloads": -1, "filename": "possum-1.4.tar.gz", "has_sig": false, "md5_digest": "6c6b1f0e5255552c7e77cc1df54e24b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9011, "upload_time": "2018-09-13T17:12:24", "url": "https://files.pythonhosted.org/packages/54/05/66befe91952aae79f65606e2df02f78e77411b199bad8aac5a8e71c1dedd/possum-1.4.tar.gz" } ], "1.4.1": [ { "comment_text": "", "digests": { "md5": "e4cf271d22501d8f7d535f7a06ba4c78", "sha256": "72f5b55b39cb37d717cca22af4b047b14a42d921da3f2f6b9cf182a94d2390e9" }, "downloads": -1, "filename": "possum-1.4.1.tar.gz", "has_sig": false, "md5_digest": "e4cf271d22501d8f7d535f7a06ba4c78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9202, "upload_time": "2018-09-14T19:05:10", "url": "https://files.pythonhosted.org/packages/be/99/decb28da43c95e93b3a3f2b916cb5bde5c0c8f35c5c0a951f6b0f3c045d4/possum-1.4.1.tar.gz" } ], "1.4.2": [ { "comment_text": "", "digests": { "md5": "a476ff0d33040ca4710d38fcb093a2df", "sha256": "e98e187f690277ebcb321c2331a28fffcd7d3d9b2ae28353249f25e9291c042b" }, "downloads": -1, "filename": "possum-1.4.2.tar.gz", "has_sig": false, "md5_digest": "a476ff0d33040ca4710d38fcb093a2df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9461, "upload_time": "2018-09-28T15:12:43", "url": "https://files.pythonhosted.org/packages/f1/2e/2a65ab73e47ed2c04912fd8432b3670ab2d9b8f33bacc7b16ceb46b83a81/possum-1.4.2.tar.gz" } ], "1.4.3": [ { "comment_text": "", "digests": { "md5": "e78e8fc792cabaa541d54baa2e5f14f5", "sha256": "9eabad65412337cb94adabed9b17ec865461f6391ea9cd468af5c8c0363fc772" }, "downloads": -1, "filename": "possum-1.4.3.tar.gz", "has_sig": false, "md5_digest": "e78e8fc792cabaa541d54baa2e5f14f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10098, "upload_time": "2018-10-01T15:18:38", "url": "https://files.pythonhosted.org/packages/44/5c/3f594fc2dcb7eccf7e80452a4f5dca26c006c1ee42464064cd8b406739b7/possum-1.4.3.tar.gz" } ], "1.4.4": [ { "comment_text": "", "digests": { "md5": "bf55f9013943c4b4f191966fecfc2ce6", "sha256": "5df13ea988ce6d8d27a44e251f0d7cd804dd664bd2f8dfbfb1aa76dc4186fabc" }, "downloads": -1, "filename": "possum-1.4.4.tar.gz", "has_sig": false, "md5_digest": "bf55f9013943c4b4f191966fecfc2ce6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10174, "upload_time": "2018-11-02T00:40:58", "url": "https://files.pythonhosted.org/packages/f8/c1/82c100ff8c62556a1b43a5e9ba91bb59ad0a55fe99174378bca28c556898/possum-1.4.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bf55f9013943c4b4f191966fecfc2ce6", "sha256": "5df13ea988ce6d8d27a44e251f0d7cd804dd664bd2f8dfbfb1aa76dc4186fabc" }, "downloads": -1, "filename": "possum-1.4.4.tar.gz", "has_sig": false, "md5_digest": "bf55f9013943c4b4f191966fecfc2ce6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10174, "upload_time": "2018-11-02T00:40:58", "url": "https://files.pythonhosted.org/packages/f8/c1/82c100ff8c62556a1b43a5e9ba91bb59ad0a55fe99174378bca28c556898/possum-1.4.4.tar.gz" } ] }