{ "info": { "author": "Liquid State Pty Ltd", "author_email": "dev@liquid-state.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "======================\nS3 log parsing library\n======================\n\nA python library to parse S3 log files.\n\n\nWarning\n=======\n\nUnit tests currently require actual S3 credentials (and a bucket with logs) and can therefore only be run manually.\nMocking the relevant parts of boto.s3 is on the roadmap. Contributions are welcome :)\n\n\nPurpose\n=======\n\nDownload S3 logs from a bucket, and parse them.\n\nThis application does not store the log objects generated and leaves that to other applications.\n\n\nInstall\n=======\n\nEventually from pypi ...\n\n\nUse\n===\n\nTo get logs, simply use the Downloader class::\n\n from itertools import chain\n from pprint import pprint\n from lss3logs.download import Downloader\n\n MY_ACCESS_KEY_ID = 'XXX'\n MY_KEY_SECRET = 'XXX'\n MY_S3_BUCKET_NAME = 'XXX'\n\n downloader = Downloader(\n connection=None,\n aws_access_key_id=MY_ACCESS_KEY_ID,\n aws_key_secret=MY_KEY_SECRET,\n )\n\n # download 10 logs\n logs = downloader.download_files(\n MY_S3_BUCKET_NAME,\n prefix='logs/',\n max_logs=1)\n\n entries = [ log.entries for log in logs ]\n entries = list(chain.from_iterable(entries))\n [pprint(entry.__dict__) for entry in entries]\n\n\nRunning tests\n=============\n\nFirst you need to specify the test config, which contains the AWS credentials and details of bucket tot test with.\npython-testconfig is used to manage the test configuration.\n\nCopy test_config.ini.sample to test_config.ini (in the same directory) and set correct values::\n\n export NOSE_TESTCONFIG_AUTOLOAD_INI=`pwd`/test_config.ini\n\nTo test with nose::\n\n python setup.py nosetests\n\nor running nosetests directly::\n\n nosetests -s --exe\n\nDirectly and with coverage::\n\n nosetests -s --exe --with-coverage --cover-package=lss3logs\n\n(Note: the --exe includes python files whoch are executable, so it's optional if you don't have any.)\n\n\nCode quality\n============\n\nChecking code with pylint::\n\n pylint lss3logs\n\n\nTODO\n====\n\n* mock boto output (see https://github.com/eykd/duo/blob/master/test_duo.py for an example)\n* fix as many errors as possbile reported by pylint\n* bring test coverage to 100%\n* use Sphinx for docs\n\n\nCredits\n=======\n\nThe regular expression for parsing the log lines is copied from a script by \"kkowalczyk\" located at http://code.google.com/p/kjk/source/browse/trunk/scripts/test_parse_s3_log.py", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/liquid-state/ls-s3-logs", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "ls-s3-logs", "package_url": "https://pypi.org/project/ls-s3-logs/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ls-s3-logs/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/liquid-state/ls-s3-logs" }, "release_url": "https://pypi.org/project/ls-s3-logs/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "A library to parse S3 log files.", "version": "0.1.2" }, "last_serial": 794382, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "e35dcd4a7ac0acff3fb9537eeb2b5a05", "sha256": "6fe3f11fae5e792eab0c1a35a1970d81136430c51b505e01656f9554c60198da" }, "downloads": -1, "filename": "ls-s3-logs-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e35dcd4a7ac0acff3fb9537eeb2b5a05", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12477, "upload_time": "2013-04-01T03:18:14", "url": "https://files.pythonhosted.org/packages/8a/a5/3b4e2a3254da1c2a8ab966188f534ac3609db793c0463d70a9135082193f/ls-s3-logs-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "289ac5853198421765f4512b537fffed", "sha256": "cb849a3d2f6a3a05e0588623dd6d5581759573d5151024da3cf19531bf98cdf0" }, "downloads": -1, "filename": "ls-s3-logs-0.1.1.tar.gz", "has_sig": false, "md5_digest": "289ac5853198421765f4512b537fffed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11388, "upload_time": "2013-04-01T03:25:05", "url": "https://files.pythonhosted.org/packages/e9/b6/e67094718d98eb67733c061b37e243d813f20fdbd59aa83f6f2585a119fc/ls-s3-logs-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "2fd50464bc0c29eed1a65f9e44f4c81d", "sha256": "0e7533796dc269f66b9470bb05ce08fd0cd4f9abe04b3628791afb40a378c2ab" }, "downloads": -1, "filename": "ls-s3-logs-0.1.2.tar.gz", "has_sig": false, "md5_digest": "2fd50464bc0c29eed1a65f9e44f4c81d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12492, "upload_time": "2013-04-01T03:25:45", "url": "https://files.pythonhosted.org/packages/ab/c8/a581a9c83451e127f908b69a757e7c00369aefc558de193d22b808fc24fb/ls-s3-logs-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2fd50464bc0c29eed1a65f9e44f4c81d", "sha256": "0e7533796dc269f66b9470bb05ce08fd0cd4f9abe04b3628791afb40a378c2ab" }, "downloads": -1, "filename": "ls-s3-logs-0.1.2.tar.gz", "has_sig": false, "md5_digest": "2fd50464bc0c29eed1a65f9e44f4c81d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12492, "upload_time": "2013-04-01T03:25:45", "url": "https://files.pythonhosted.org/packages/ab/c8/a581a9c83451e127f908b69a757e7c00369aefc558de193d22b808fc24fb/ls-s3-logs-0.1.2.tar.gz" } ] }