{ "info": { "author": "Dingyuan Wang", "author_email": "gumblex@aosc.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Version Control" ], "description": "fossilpy\n========\nSimple pure-python library for reading Fossil repositories.\n\n.. code-block:: pycon\n\n >>> r = Repo('project.fossil')\n >>> f = r.file(123)\n >>> f.blob\n b'File content...'\n >>> filelist = r.manifest(124).F\n >>> filelist\n [('file', '1234567890aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')]\n\nThis is a thin wrapper, and Fossil is an SQLite-based version control system.\nSo using raw SQL (``Repo.execute``) may be necessary to get more information.\n\nWriting, committing, or executing Fossil commands is not supported. (Although you can do SQL, writing is not recommended.) Reading the config database (~/.fossil), the checkout database (_FOSSIL_), or the checkout directory is also not supported.\n\nAPI\n---\n\nClasses\n~~~~~~~\n\n- **Repo(repository, check=False, cachesize=64)**: Represents a Fossil repo. ``repository`` is the file name. ``check`` specifies whether to calculate checksum. If numpy is not installed, calculation will be much slower. ``cachesize`` specifies how much blobs should be cached, set to 0 to disable.\n\n - Repo.\\ **file(self, key)**: Returns a ``File`` according to the ``key``, which is either the blob's rid or uuid (SHA1/SHA3-256).\n\n - Repo.\\ **manifest(self, key)**: Returns a ``StructuralArtifact`` according to the ``key``.\n\n - Repo.\\ **artifact(self, key, type_=None)**: Returns an ``Artifact`` according to the ``key``. ``type_`` can be ``'structural'`` or ``'file'``.\n\n - Repo.\\ **__getitem__(self, key)**: Returns an ``Artifact`` according to the ``key``.\n\n - Repo.\\ **find_artifact(self, prefix)**: Given the uuid (SHA1/SHA3-256) prefix, returns a tuple ``(rid, uuid)``. If not found, raises a ``KeyError``.\n\n - Repo.\\ **to_uuid(self, rid)**: Given the rid, returns the uuid of a blob. If not found, raises an ``IndexError``.\n\n - Repo.\\ **to_rid(self, uuid)**: Given the uuid, returns the rid of a blob. If not found, raises an ``IndexError``.\n\n - Repo.\\ **execute(self, sql, parameters=None)**: Execute raw SQL statements on the Fossil repo (SQLite database). See also `src/schema.c `_.\n\n- **Artifact(blob=None, rid=None, uuid=None)**: Represents a Fossil artifact, which is anything inside the ``blob`` table. Has attributes ``blob``, ``rid`` and ``uuid``. ``blob`` is the artifact(file) content.\n\n- **File(blob=None, rid=None, uuid=None)**: Represents a file, same as ``Artifact``.\n\n- **StructuralArtifact(blob=None, rid=None, uuid=None)**: Represent a structural artifact, aka. manifest, can be such as check-in, wiki and tickets.\n\n - StructuralArtifact.\\ **keys()**: List cards.\n - StructuralArtifact.\\ **cards**: Dictionary of cards. If a card type can occur multiple times, cards of the same type are stored in a list.\n - Cards can be accessed like ``art.F``, ``art['F']`` or ``art.file``. See also `Fossil documentation `_. Some useful cards: F(file), C(comment), P(parent_artifact), U(user_login), D(datetime), W(wiki_text)\n\n\nMisc.\n~~~~~\n\n- **LRUCache(maxlen)**: A simple implementation of least recently used (LRU) cache.\n\nFossil uses Julian date in most tables.\n\n- **julian_to_unix(t)**: Convert Julian date ``t`` to unix timestamp.\n- **unix_to_julian(t)**: Convert unix timestamp ``t`` to Julian date.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gumblex/fossilpy", "keywords": "fossil", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "fossilpy", "package_url": "https://pypi.org/project/fossilpy/", "platform": "any", "project_url": "https://pypi.org/project/fossilpy/", "project_urls": { "Homepage": "https://github.com/gumblex/fossilpy" }, "release_url": "https://pypi.org/project/fossilpy/0.3/", "requires_dist": null, "requires_python": "", "summary": "Simple pure-python library for reading Fossil repositories.", "version": "0.3" }, "last_serial": 4870585, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "044329d3455d0359a1994f559355e93d", "sha256": "e3c560e428faffb66169508af6ec92da0260f6de0b266bec1e5b5ab12c5b41fc" }, "downloads": -1, "filename": "fossilpy-0.2.tar.gz", "has_sig": false, "md5_digest": "044329d3455d0359a1994f559355e93d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6120, "upload_time": "2017-08-29T06:26:10", "url": "https://files.pythonhosted.org/packages/9d/37/d51b6ecdf4becb013b9bb3a1dd3c814d51dca0ddd716561257c724f307aa/fossilpy-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "e27f127bac4c6a1a7b543491e1bfc476", "sha256": "f6a2eb8f14766bb4d6991281489c4c56e34ac837eabda8f54c910ed44ff8eadd" }, "downloads": -1, "filename": "fossilpy-0.3.tar.gz", "has_sig": true, "md5_digest": "e27f127bac4c6a1a7b543491e1bfc476", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6200, "upload_time": "2019-02-26T16:50:53", "url": "https://files.pythonhosted.org/packages/a9/ce/3b7f86ed840ce37d88cd932d2d9269737f5b43093a8e247006bec3dd5902/fossilpy-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e27f127bac4c6a1a7b543491e1bfc476", "sha256": "f6a2eb8f14766bb4d6991281489c4c56e34ac837eabda8f54c910ed44ff8eadd" }, "downloads": -1, "filename": "fossilpy-0.3.tar.gz", "has_sig": true, "md5_digest": "e27f127bac4c6a1a7b543491e1bfc476", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6200, "upload_time": "2019-02-26T16:50:53", "url": "https://files.pythonhosted.org/packages/a9/ce/3b7f86ed840ce37d88cd932d2d9269737f5b43093a8e247006bec3dd5902/fossilpy-0.3.tar.gz" } ] }