一个简单的数据库系统

sunlite的Python项目详细描述


#太阳岩

Sunlite简单数据库系统

[*Jump to sunlite database server]

简单、快速、本地、用户友好

速度菜单

对于Sunlite数据库

[*Jump to sunlite database connection]
[*Jump to sunlite database tutorials]
[*Jump to sunlite database examples]

对于Sunlite服务器数据库

[*Jump to sunlite database server Q/A]
[*Jump to sunlite database server getting started]
[*Jump to sunlite database server how to links]

什么是太阳石?

ans:sunlite是一个用于简单数据管理的模块。

  • 如何使用
    • 连接到内存。
    • 连接到数据库。
    • 创建新标题。 >;gt;
    • 添加数据或拉取数据 >;gt;
    • 享受^ ^

连接

Sunlite lets you connect as you want.

^{pr 1}$

Generating new header

headers are like boxes which contains your datas , don't forget to make one before pushing or pulling data

^{pr 2}$

Pushing data to headers

by pushing , we add data in headers to contain . you can push any data .

^{pr 3}$

Pullling data from headers

you can pull all data of header or an invidual data

^{pr 4}$

don't use same names for two datas as it will remove 2nd one .

Get a header as you want. This time duplicate names are accepted.

unlike pull function , this function doesn't update duplicate datas as sends as they are .

this is useful in maintaining a large set of same data.

example

^{pr 5}$

Beauty print .

You can beauty print all data's in all headers .

^{pr 6}$

Get all headers

^{pr 7}$

Example with a user info system with sunlite

^{pr 8}$

Sunlite Server

Sunlite server is a database server which can be generated in memory or in a physical database .

Why and How ?

^{bq 3}$

I think i am ready for my first server :)

To 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

^{pr 9}$

So 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

^{pr 10}$

and your server will start running in http://localhost:5000

要禁用或无法日志,可以在服务内部使用logs=Truelogs=False

例如,用于关闭日志

fromsunlite.serverimportServeServe(name="test",logs=False,logfolder="logs").invoke()

默认情况下会打开日志。

要打开首选IP地址上的服务器,
fromsunlite.serverimportServeServe(name="test",logs=False,logfolder="logs").invoke(ip='your ip',port=your_port)#example Serve(name="test" , logs=False , logfolder="logs").invoke(ip='127.0.0.1' , port = 5000)

Links to send database requests.

to get all data in your database

http://[your-ip]:[your-port]/a/

to get header list

http://[your-ip]:[your-port]/h/

to create a new header

http://[your-ip]:[your-port]/new/[header-name]

to pull a data

http://[your-ip]:[your-port]/p/[data-name]

to get total data of a header

http://[your-ip]:[your-port]/g/[header-name]

to add a data or modify in a header

http://[your-ip]:[your-port]/add/[data-name]/[data]/[header-name]

do remember html link syntaxes.

ex.

http://127.0.0.1:5000/p/hello将提取名为hello的数据 http://127.0.0.1:5000/g/myheader将从头myheader etc中提取数据

重要

用%20f格式化空格

例如,如果您的数据名是my data 使链接像http://127.0.0.1:5000/p/my%f20data 不是http://127.0.0.1:5000/p/my数据

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
用于批量操作的java RESTful API分块响应   java读取在线存储的文本文件   在Java ME中将双精度舍入到小数点后5位   java查找一个数字的最接近因子   java更改JMenuBar的字体   java Kmeans聚类算法运行时间和复杂性   java是否可以阻止try catch返回null   java内容解析器指向具有正确URI的错误表   java Android Kotlin插装测试未被识别为插装测试   java TestNG@Dataprovider   在forloop和print语句中声明变量时发生java错误   java在Android Studio 3中设置JNI