{ "info": { "author": "Sun", "author_email": "sun600@outlook.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "#sunlite\n\n\n# Sunlite Simple Database System\n\n[**Jump to sunlite database server*]\n\n## simple, fast, local, userfriendly\n\n## Speed Menu\n#### for sunlite database\n[**Jump to sunlite database connection*]
\n[**Jump to sunlite database tutorials*]
\n[**Jump to sunlite database examples*]
\n#### for sunlite server database \n[**Jump to sunlite database server Q/A*]
\n[**Jump to sunlite database server getting started*]
\n[**Jump to sunlite database server how to links*]
\n \n### what is sunlite ?\n\n#### Ans: Sunlite is a module for simple data management. \n\n* How to use\n * Connect to memory.\n >>\n * connect to a database.\n >>\n * Create a new header .\n >>\n * add data , or pull data\n >>\n * enjoy ^~^\n\n## Connecting\n\nSunlite lets you connect as you want.\n\n```python\nfrom sunlite.db import connect\n\ndb = connect() #for memory\ndb = connect(\"my_db\") #for connecting with \"my_db\" , it will be auto generated if doesnt exists.\ndb = connect(\"my_db\",logs=False) # for connecting to \"my_db\" but say no to logs\n\n```\n\n## Generating new header\nheaders are like boxes which contains your datas , don't forget to make one before pushing or pulling data\n\n```python\n\ndb = connect(\"my_db\")\n\ndb.new(\"websites\") #here , we made a header named websites.\n\n```\n\n## Pushing data to headers\n\nby pushing , we add data in headers to contain . you can push any data .\n\n```python \n\ndb = connect(\"my_db\")\n\ndb.new(\"websites\")\n\nname = \"google\"\ndata = \"http://google.com\"\n\ndb.push(name,data) #here , we are pushing http://google.com with the name google in websites header\n```\n\n## Pullling data from headers\n\nyou can pull all data of header or an invidual data\n\n```python\n\ndb = connect(\"my_db\",logs=False)\n\ndb.new(\"websites\")\n\nname = \"google\"\ndata = \"http://google.com\"\n\ndb.push(name,data)\n\na = db.pull(\"websites\") #it will pull all data in website header as a dictionary.\n\na = db.pull(\"google\") #it will only pull the data of google no matter where it is in which header .\n```\ndon't use same names for two datas as it will remove 2nd one .\n\n## Get a header as you want. This time duplicate names are accepted.\n### unlike pull function , this function doesn't update duplicate datas as sends as they are . \n### this is useful in maintaining a large set of same data.\n\nexample\n\n```python\n\ndb.connect(\"students\",logs=False)\n\ndb.new(\"Allan\")\n\ndb.push(\"maths\",50)\ndb.push(\"english\",70)\ndb.push(\"science\",40)\n\n\n#now for akmal\ndb.new(\"Akmal\")\n\ndb.push(\"maths\",45)\ndb.push(\"english\",60)\ndb.push(\"science\",70)\n\ndb.get(\"Akmal\") #for getting akmal marks\ndb.get(\"allan\") #for getting allan's marks\n\n\n```\n\n## Beauty print .\n\nYou can beauty print all data's in all headers .\n\n```python\n\ndb = connect(\"my_db\",logs=False)\n\ndb.new(\"websites\")\n\nname = \"google\"\ndata = \"http://google.com\"\n\ndb.push(name,data)\n\ndb.beauty() #this prints all data nicely\n\n```\n# Get all headers\n\n```python\n\ndb = connect(\"my_db\",logs=False)\n\ndb.headers()\n\n```\n\n# Example with a user info system with sunlite \n\n```python\n\ndb = connect(\"my_db\",logs=False)\n\ndb.new(\"users\")\n\nname = \"Axel\"\ndata = [\"age\":13 , \"nation\": \"USA\"]\n\ndb.push(name,data)\n\nname = \"Jack\"\ndata = [\"age\":15, \"nation\": \"England\"]\ndb.push(name,data)\n\ndb.beauty()\n```\n\n\n# Sunlite Server\n**Sunlite** server is a database server which can be generated in memory or in a physical database .\n\n### Why and How ?\n\n> Q. Why **Sunlite** need database server ?\n> A. Sunlite is a python system which can't be used from other languages but with sunlite server, users can use this simple database system from any programming language after invoking the server with python.\n> Q. How to use sunlite server from different programming languages?\n> A. Using **http get** requests to server. **Wrappers from different languages coming soon.**\n#### I think i am ready for my first server :)\nTo start a server of your existing sunlite database ( tutorials above about using sunlite database system ) , simply login to your python console installed and execute from sunlite.server import Serve \n \n \n\n```\nfrom sunlite.server import Serve\nServe(name=\"[DBNAME]\" , logfolder=\"[LOGPATH]\").invoke()\n# [DBNAME] is the database name you created using sunlite or any name if you want to create a new. remember sunlite can connect to database # you create with server and vice versa.\n# [LOGPATH] is the path to log your server tasks. ex. 'E:/logs'\n```\nSo to connect a sunlite database with the name 'test' and save it's logs in a folder named logs in the project directory , just do \n\n```python\nfrom sunlite.server import Serve\nServe(name=\"test\" , logfolder=\"logs\").invoke()\n```\nand your server will start running in http://localhost:5000\n\nto disable or unable logs , you can use `logs=True` or `logs=False` inside Serve.\n\nEx. for turning logs off\n```python\nfrom sunlite.server import Serve\nServe(name=\"test\" , logs=False , logfolder=\"logs\").invoke()\n```\n\nlogs are on by default.\n\n##### To open the server on your prefered ip address, \n\n```python\nfrom sunlite.server import Serve\nServe(name=\"test\" , logs=False , logfolder=\"logs\").invoke(ip='your ip' , port = your_port)\n#example Serve(name=\"test\" , logs=False , logfolder=\"logs\").invoke(ip='127.0.0.1' , port = 5000)\n```\n\n### Links to send database requests.\n\n###### to get all data in your database\n\nhttp://[your-ip]:[your-port]/a/\n\n###### to get header list \n\nhttp://[your-ip]:[your-port]/h/\n\n###### to create a new header \n\nhttp://[your-ip]:[your-port]/new/[header-name]\n\n###### to pull a data \n\nhttp://[your-ip]:[your-port]/p/[data-name]\n\n###### to get total data of a header\n\nhttp://[your-ip]:[your-port]/g/[header-name]\n\n###### to add a data or modify in a header\n\n\nhttp://[your-ip]:[your-port]/add/[data-name]/[data]/[header-name]\n\n**do remember html link syntaxes.**\n\nex. \n\n\n**http://127.0.0.1:5000/p/hello** will pull the data named hello\n**http://127.0.0.1:5000/g/myheader** will pull data from the header myheader etc\n\n\n### Important\n\nformat spaces with %20f \n\nex. if your data name was **my data** \nmake the link like **http://127.0.0.1:5000/p/my%f20data**\nnot **http://127.0.0.1:5000/p/my data**", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://sunx2.github.io/sunlite/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "sunlite", "package_url": "https://pypi.org/project/sunlite/", "platform": "", "project_url": "https://pypi.org/project/sunlite/", "project_urls": { "Homepage": "https://sunx2.github.io/sunlite/" }, "release_url": "https://pypi.org/project/sunlite/1.1.1/", "requires_dist": null, "requires_python": "", "summary": "A simple database system", "version": "1.1.1" }, "last_serial": 4901608, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "b570e1d11adb4410b4bb0c597249d348", "sha256": "8a760900ebda7b533ac7b1084b8ec3df73b03ac1c698a1ffdc37d5f1487e526c" }, "downloads": -1, "filename": "sunlite-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b570e1d11adb4410b4bb0c597249d348", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3882, "upload_time": "2018-09-04T00:26:13", "url": "https://files.pythonhosted.org/packages/f7/45/69e50657ddb7513900af3d8c8f0402d0a80e990eb9af86969823428e28b3/sunlite-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b895bee6f7227551c7da47eec6f7fdf4", "sha256": "bb68d62ad6debc30f45532944a3b23b667e0f47b1aa9cdafe45c8288169426cd" }, "downloads": -1, "filename": "sunlite-0.2.0.tar.gz", "has_sig": false, "md5_digest": "b895bee6f7227551c7da47eec6f7fdf4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3744, "upload_time": "2018-09-04T00:26:18", "url": "https://files.pythonhosted.org/packages/71/d4/af66a38e2ab9e348d9e5be7a03932423e84727346243401126af2dc6ff59/sunlite-0.2.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "6ebdbcc52da60818378e7b82ba68f123", "sha256": "2cc22dbf953fac5845ed4fe9daa3f979472e097ceb4acf446e2883a5306042eb" }, "downloads": -1, "filename": "sunlite-0.4.0.tar.gz", "has_sig": false, "md5_digest": "6ebdbcc52da60818378e7b82ba68f123", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 89776, "upload_time": "2018-10-24T04:46:39", "url": "https://files.pythonhosted.org/packages/83/61/4c5eb2314b7048e4943d4f420543b49686ab851064162449f81967717e96/sunlite-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "b9c4f4229ff6d92ae53ab7a6e1392435", "sha256": "d8a5931ea6b75c6854d4804e016e36869e93b3a7e181496dee95a85757947449" }, "downloads": -1, "filename": "sunlite-0.5.0.tar.gz", "has_sig": false, "md5_digest": "b9c4f4229ff6d92ae53ab7a6e1392435", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 89816, "upload_time": "2018-10-25T23:43:13", "url": "https://files.pythonhosted.org/packages/aa/56/e4019254419bbea79ab8a1928aa0bdac97db667a6680e9163ac93f5b2420/sunlite-0.5.0.tar.gz" } ], "0.9.9": [ { "comment_text": "", "digests": { "md5": "fab551953242f36c439bc844ec71e6df", "sha256": "d07021bd50b9e16611945670b496b3ec7fde5f7678f19f29f5b6e727dd8e2ee2" }, "downloads": -1, "filename": "sunlite-0.9.9.tar.gz", "has_sig": false, "md5_digest": "fab551953242f36c439bc844ec71e6df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 89912, "upload_time": "2018-12-05T19:55:40", "url": "https://files.pythonhosted.org/packages/41/56/c026493d4f6db8e8af1d0c3523478af8c00d748ff833c2bf0fd3c847c5cd/sunlite-0.9.9.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "7cde90291c0bfbc0de6636953a325b2a", "sha256": "227039fc616e2b7e82609396cc28ac726d0c5e963cd0e0d1f43e4b734f244426" }, "downloads": -1, "filename": "sunlite-1.0.7.tar.gz", "has_sig": false, "md5_digest": "7cde90291c0bfbc0de6636953a325b2a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 91505, "upload_time": "2018-12-05T20:41:18", "url": "https://files.pythonhosted.org/packages/d1/0e/0a20180d7fad0eb183ac0c8e9272937cebb2cb399e2c0131ea471709650e/sunlite-1.0.7.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "27ea1900e22532b66bb8addf8f4b0e9a", "sha256": "ab1e125c4a9ed6ad9d86d4d09449041a1dc8731dfa5a7d0b16ffaef4d2f1d12b" }, "downloads": -1, "filename": "sunlite-1.1.0.tar.gz", "has_sig": false, "md5_digest": "27ea1900e22532b66bb8addf8f4b0e9a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 92062, "upload_time": "2018-12-05T22:35:44", "url": "https://files.pythonhosted.org/packages/da/87/65d3859c6724f1ee65695f7a193e6638a3ec9b53f5331e02c74f2a04631d/sunlite-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "570d05e28dc810d3a0aa1c8b2ee3a140", "sha256": "363ed40f972d6eca11007cda53d20a4615df5cd783c1d37554bb628573c4ca3c" }, "downloads": -1, "filename": "sunlite-1.1.1.tar.gz", "has_sig": false, "md5_digest": "570d05e28dc810d3a0aa1c8b2ee3a140", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 92092, "upload_time": "2019-03-05T19:57:11", "url": "https://files.pythonhosted.org/packages/09/5c/cb6ffbb33947bd2b082494df4072a96b02beed14eefb6716539e17b1f205/sunlite-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "570d05e28dc810d3a0aa1c8b2ee3a140", "sha256": "363ed40f972d6eca11007cda53d20a4615df5cd783c1d37554bb628573c4ca3c" }, "downloads": -1, "filename": "sunlite-1.1.1.tar.gz", "has_sig": false, "md5_digest": "570d05e28dc810d3a0aa1c8b2ee3a140", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 92092, "upload_time": "2019-03-05T19:57:11", "url": "https://files.pythonhosted.org/packages/09/5c/cb6ffbb33947bd2b082494df4072a96b02beed14eefb6716539e17b1f205/sunlite-1.1.1.tar.gz" } ] }