{ "info": { "author": "Ben O'Steen, Friedrich Lindenberg, Rufus Pollock", "author_email": "bosteen@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "OFS is a bucket/object storage library.\n\nIt provides a common API for storing bitstreams (plus related metadata) in\n'bucket/object' stores such as:\n\n * S3, Google Storage, Eucalytus, Archive.org\n * Filesystem (via pairtree)\n * 'REST' Store (see remote/reststore.py - implementation at http://bitbucket.org/pudo/repod/)\n * Riak (buggy)\n * **add a backend here** - just implement the methods in base.py\n\nWhy use the library:\n\n * Abstraction: write common code but use different storage backends\n * More than a filesystem, less than a database - support for metadata as well as bitstreams\n\nRequirements\n============\n\nFor all boto-based stores (Google Storage, S3 etc) require boto>=2.0.\n\nExample Usage\n=============\n\n(local version - depends on 'pairtree', and 'simplejson')::\n\n >>> from ofs.local import PTOFS\n\n >>> o = PTOFS()\n (Equivalent to 'o = PTOFS(storage_dir = \"data\", uri_base=\"urn:uuid:\", hashing_type=\"md5\")')\n\n # Claim a bucket - this will add the bucket to the list of existing ones\n >>> uuid_id = o.claim_bucket()\n >>> uuid_id\n '4aaa43cdf5ba44e2ad25acdbd1cf2f70'\n\n # Choose a bucket name - if it exists, a new UUID one will be formed instead and returned\n >>> bucket_id = o.claim_bucket(\"foo\")\n >>> bucket_id\n 'foo'\n >>> bucket_id = o.claim_bucket(\"foo\")\n >>> bucket_id\n '1bf93208521545879e79c13614cd12f0'\n\n # Store a file:\n >>> o.put_stream(bucket_id, \"foo.txt\", open(\"foo....))\n {'_label': 'foo.txt', '_content_length': 10, '_checksum': 'md5:10feda25f8da2e2ebfbe646eea351224', '_last_modified': '2010-08-02T11:37:21', '_creation_date': '2010-08-02T11:37:21'}\n\n # or:\n >>> o.put_stream(bucket_id, \"foo.txt\", \"asidaisdiasjdiajsidjasidji\")\n {'_label': 'foo.txt', '_content_length': 10, '_checksum': 'md5:10feda25f8da2e2ebfbe646eea351224', '_last_modified': '2010-08-02T11:37:21', '_creation_date': '2010-08-02T11:37:21'}\n\n # adding a file with some parameters:\n >>> o.put_stream(bucket_id, \"foooo\", \"asidaisdiasjdiajsidjasidji\", params={\"original_uri\":\"http://....\"})\n {'_label': 'foooo', 'original_uri': 'http://....', '_last_modified': '2010-08-02T11:39:11', '_checksum': 'md5:3d690d7e0f4479c5a7038b8a4572d0fe', '_creation_date': '2010-08-02T11:39:11', '_content_length': 26}\n\n # Get the underlying URL pointing to a resource\n >>> o.get_url(bucket_id, \"foo\")\n [typical local pairtree response:]\n \"file:///opt/ofs_store/pairtree_root/1b/f9/32/......./obj/foo\"\n [typical remote response]\n \"http://...\"\n \"ftp://...\"\n\n # adding to existing metadata:\n >>> o.update_metadata(bucket_id, \"foooo\", {'foo':'bar'})\n {'_label': 'foooo', 'original_uri': 'http://....', '_last_modified': '2010-08-02T11:39:11', '_checksum': 'md5:3d690d7e0f4479c5a7038b8a4572d0fe', '_creation_date': '2010-08-02T11:39:11', '_content_length': 26, 'foo': 'bar'}\n\n # Remove keys\n >>> o.remove_metadata_keys(bucket_id, \"foooo\", ['foo'])\n {'_label': 'foooo', 'original_uri': 'http://....', '_last_modified': '2010-08-02T11:39:11', '_checksum': 'md5:3d690d7e0f4479c5a7038b8a4572d0fe', '_creation_date': '2010-08-02T11:39:11', '_content_length': 26}\n\n # Delete blob\n >>> o.exists(bucket_id, \"foooo\")\n True\n >>> o.del_stream(bucket_id, \"foooo\")\n >>> o.exists(bucket_id, \"foooo\")\n False\n\n # Iterate through ids for buckets held:\n >>> for item in o.list_buckets():\n ... print(item)\n ... \n 447536aa0f1b411089d12399738ede8e\n 4a726b0a33974480a2a26d34fa0d494d\n 4aaa43cdf5ba44e2ad25acdbd1cf2f70\n .... etc\n \n # Display the labels in a specific bucket:\n >>>o.list_labels(\"1bf93208521545879e79c13614cd12f0\")\n [u'foo.txt']\n\nDeveloper\n=========\n\nTests use plain unittest but recommend using nose.\n\nTo run the botostore tests you'll need to copy test.ini.tmpl to test.ini and\nput in details for a google storage account.\n\n\nChangelog\n=========\n\nv0.4.1: 2011-08-13\n------------------\n\n * Set checksum (md5) based on etag (botostore backends) if not set\n\nv0.4: 2011-04-28\n----------------\n\n * New authenticate_request method for boto based backends.\n * Improved update_medata in botostore (no need to download and re-upload).\n\nv0.3: 2011-01-20\n----------------\n\n * S3Bounce backend (use authorization credentials from CKAN).\n * Use setuptools plugins with ofs.backend to allow for 3rd party backends\n * ofs_upload command\n\nv0.2: 2010-11-20\n----------------\n\n * Google Storage support.\n * REST store\n\nv0.1: 2010-10-14\n----------------\n\n * Initial implemenation with PairTree and S3\n", "description_content_type": "", "docs_url": "https://pythonhosted.org/ofs/", "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/okfn/ofs", "keywords": "", "license": "http://www.apache.org/licenses/LICENSE-2.0", "maintainer": "", "maintainer_email": "", "name": "ofs", "package_url": "https://pypi.org/project/ofs/", "platform": "", "project_url": "https://pypi.org/project/ofs/", "project_urls": { "Homepage": "http://github.com/okfn/ofs" }, "release_url": "https://pypi.org/project/ofs/0.4.3/", "requires_dist": null, "requires_python": "", "summary": "OFS - provides plugin-orientated low-level blobstore.", "version": "0.4.3" }, "last_serial": 3695106, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "3d66deb554febc9bc48b5b271a0b5edb", "sha256": "3f5d43bf6f21a269c906ea3fd0052e0a068852757d26480db7040520a3ea6c23" }, "downloads": -1, "filename": "ofs-0.1.tar.gz", "has_sig": false, "md5_digest": "3d66deb554febc9bc48b5b271a0b5edb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10235, "upload_time": "2010-10-14T10:54:32", "url": "https://files.pythonhosted.org/packages/d1/bc/d6e64ee21564615d19a3cd81ef12407df008f8c1c91a18e6ca650b779ab0/ofs-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "d8d71f1b843bcd6ace9d60da86baa71c", "sha256": "a11e603a6a96bc592ec9dc89f327fc38b215d3f465ba565757b29de8eccf2be1" }, "downloads": -1, "filename": "ofs-0.2.tar.gz", "has_sig": false, "md5_digest": "d8d71f1b843bcd6ace9d60da86baa71c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 150352, "upload_time": "2011-01-19T19:29:57", "url": "https://files.pythonhosted.org/packages/20/fb/52c7e3993af21b2bf3c68db1e6474d8b24b66973fc357d3aa46d17c1f659/ofs-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "5acf620f6d4a26a285c0c513115f5c99", "sha256": "c09cb559b2e5b2a55a29454f467232f874c6dd69803c602dd21af496a93aeea9" }, "downloads": -1, "filename": "ofs-0.3.tar.gz", "has_sig": false, "md5_digest": "5acf620f6d4a26a285c0c513115f5c99", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 151661, "upload_time": "2011-01-20T03:52:23", "url": "https://files.pythonhosted.org/packages/9f/02/abd102e4df3b54b1c84e5fc3ac0fad9d42da381ed3210a4acd37fad828b9/ofs-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "d7cd4f52c857130a802e216e0dd689a8", "sha256": "75ad472eece1f310566d356eb0d71b680fd941019748f2888fc902d5fae0519c" }, "downloads": -1, "filename": "ofs-0.3.1.tar.gz", "has_sig": false, "md5_digest": "d7cd4f52c857130a802e216e0dd689a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 153859, "upload_time": "2011-03-07T22:43:16", "url": "https://files.pythonhosted.org/packages/0a/d1/51fb9cd324ff9645e71b4d487666ad6f371b02b3c01c4cf1811dc0a610bb/ofs-0.3.1.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "77f12bbc31a94b5f4037a15e3ac5a4e5", "sha256": "a60fdb82f5244402f737dd88cae7a439c1dbaac0659c689808f3a5d069fbbe73" }, "downloads": -1, "filename": "ofs-0.4.tar.gz", "has_sig": false, "md5_digest": "77f12bbc31a94b5f4037a15e3ac5a4e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 154871, "upload_time": "2011-04-29T21:12:03", "url": "https://files.pythonhosted.org/packages/3b/81/1274e51a94fcc0229446925e5487633c594d6b955ad8fa9915e2c2636a72/ofs-0.4.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "da10c116fd05288873e8438477545464", "sha256": "a9625b9e887688df2061dab20a6bbf0dbb9d5ab2f4a0d8ccd3571ee38477a501" }, "downloads": -1, "filename": "ofs-0.4.1.tar.gz", "has_sig": false, "md5_digest": "da10c116fd05288873e8438477545464", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 155054, "upload_time": "2011-08-13T21:29:28", "url": "https://files.pythonhosted.org/packages/0a/a4/518652eb37babdbeb2c219162bedeeda3d8c60105ade7beb14d6fb4da101/ofs-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "948636796aee5d2657226f6780d95a54", "sha256": "f0b9dcefdaf19d01776526da3c99ae24dfb9d7df60740a42fd709e332bb503d5" }, "downloads": -1, "filename": "ofs-0.4.2.tar.gz", "has_sig": false, "md5_digest": "948636796aee5d2657226f6780d95a54", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 156198, "upload_time": "2013-12-26T10:32:23", "url": "https://files.pythonhosted.org/packages/59/48/9fc47bc658c0bca61892bf4304914b490a9ca24750c448d798075a467b18/ofs-0.4.2.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "3553691dea6a902a400c6c4e9b71264d", "sha256": "aa57c237a0b3af44e988a4dbc8d504610c86851303338708eb39ff32766281f0" }, "downloads": -1, "filename": "ofs-0.4.3.tar.gz", "has_sig": false, "md5_digest": "3553691dea6a902a400c6c4e9b71264d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 153613, "upload_time": "2018-03-22T12:01:24", "url": "https://files.pythonhosted.org/packages/59/90/d7b380d3c7098a3e6df8b95c679bd8a89bd92d6617d7740c0f03faaf4c85/ofs-0.4.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3553691dea6a902a400c6c4e9b71264d", "sha256": "aa57c237a0b3af44e988a4dbc8d504610c86851303338708eb39ff32766281f0" }, "downloads": -1, "filename": "ofs-0.4.3.tar.gz", "has_sig": false, "md5_digest": "3553691dea6a902a400c6c4e9b71264d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 153613, "upload_time": "2018-03-22T12:01:24", "url": "https://files.pythonhosted.org/packages/59/90/d7b380d3c7098a3e6df8b95c679bd8a89bd92d6617d7740c0f03faaf4c85/ofs-0.4.3.tar.gz" } ] }