{ "info": { "author": "Will Breaden Madden", "author_email": "wbm@protonmail.ch", "bugtrack_url": null, "classifiers": [], "description": "folktales\n=========\n\n``folktales`` enables the creation, access and modification of SQL\ndatabases, with an emphasis on storing dictionaries easily and accessing\ndatabase tables as pandas DataFrames easily. It also provides template\ndictionaries suitable for logging. While it can be used with other\ndatabases, it is designed currently to be used easily with SQLite3\ndatabases.\n\n``folktales`` might be used in a logging context, whereby a status\ndictionary, which features a UUID4 identifier and a UTC datetime by\ndefault, is updated with program characteristics or other data and then\nsaved to database.\n\nsetup\n=====\n\n.. code:: bash\n\n pip install folktales\n\n``Sqliteman`` is a GUI tool that can be used to interact with SQLite3\ndatabases.\n\n.. code:: bash\n\n apt install sqliteman\n\nexamples\n========\n\ncreate a database\n-----------------\n\n.. code:: python\n\n folktales.create_database(filepath = \"database.db\")\n\naccess a database\n-----------------\n\n.. code:: python\n\n database = folktales.access_database(filepath = \"database.db\")\n\ninsert a dictionary into a database table\n-----------------------------------------\n\n.. code:: python\n\n folktales.insert_dictionary_into_database_table(\n dictionary = {\n \"a\": 1,\n \"b\": 2\n },\n table_name = \"data\",\n filepath = \"database.db\"\n )\n\nstate dictionaries\n------------------\n\nA template state dictionary can be created in the following way:\n\n.. code:: python\n\n folktales.template_state_dictionary()\n\nThis returns a dictionary that features a UUID4 identifier\n(``uuid.uuid4()``) and a datetime (``datetime.datetime.utcnow()``).\n\nA state dictionary can be created at the same time as updating it with\nan existing dictionary in the following way:\n\n.. code:: python\n\n folktales.state_dictionary(\n entries = {\n \"state_ID\" : \"84f80687-cdd7-48f9-b21c-3d75fd759604\",\n \"price_recommendation\" : 5007.24\n }\n )\n\ninsert a state dictionary into a database table\n-----------------------------------------------\n\n.. code:: python\n\n folktales.insert_state_dictionary_into_database_table(\n entries = {\n \"state_ID\" : \"84f80687-cdd7-48f9-b21c-3d75fd759604\",\n \"price_recommendation\" : 5007.24\n },\n table_name = \"do_stocks\",\n filepath = \"database.db\"\n )\n\naccess a database table as a pandas DataFrame\n---------------------------------------------\n\n.. code:: python\n\n df = folktales.DataFrame_of_database_table(\n filepath = \"database.db\",\n table_name = \"do_stocks\"\n )\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/wdbm/folktales", "keywords": "", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "folktales", "package_url": "https://pypi.org/project/folktales/", "platform": "", "project_url": "https://pypi.org/project/folktales/", "project_urls": { "Homepage": "https://github.com/wdbm/folktales" }, "release_url": "https://pypi.org/project/folktales/2018.5.3.245/", "requires_dist": null, "requires_python": "", "summary": "creation, access and modification of SQL databases", "version": "2018.5.3.245" }, "last_serial": 3829351, "releases": { "2018.5.3.245": [ { "comment_text": "", "digests": { "md5": "8043c04855bea950853011b8bc32ec0b", "sha256": "88282b476466802cdf270f6c6706e976d60858a7b99e8c565dc2bd49a4a42c84" }, "downloads": -1, "filename": "folktales-2018.5.3.245.tar.gz", "has_sig": false, "md5_digest": "8043c04855bea950853011b8bc32ec0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3860, "upload_time": "2018-05-03T02:46:06", "url": "https://files.pythonhosted.org/packages/f4/5d/f0a3d4fd12e827979ff62d195c92f6f3f871a63d20b43afe9faa75120ba3/folktales-2018.5.3.245.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8043c04855bea950853011b8bc32ec0b", "sha256": "88282b476466802cdf270f6c6706e976d60858a7b99e8c565dc2bd49a4a42c84" }, "downloads": -1, "filename": "folktales-2018.5.3.245.tar.gz", "has_sig": false, "md5_digest": "8043c04855bea950853011b8bc32ec0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3860, "upload_time": "2018-05-03T02:46:06", "url": "https://files.pythonhosted.org/packages/f4/5d/f0a3d4fd12e827979ff62d195c92f6f3f871a63d20b43afe9faa75120ba3/folktales-2018.5.3.245.tar.gz" } ] }