简单快速的python orm
oreop的Python项目详细描述
#oreopy
简单快速的python orm。
[![许可证](https://img.shields.io/github/license/mashape/apistatus.svg?maxage=2592000)(https://github.com/maclinchy/oreopy/blob/master/license)
https://github.com/maclinchy/oreopy.git
cd oreopy
sudo python3 setup.py install
``
>
-
-
-
《入门入门
我们来创建一个名为“model s.py`
``python3
``python3
frooreopy.models import base
>frooreopy.fields import integerfield,textfield
class album(base.model)
br/>标题=textfield()
artist=textfield()
year=integerfield()
album.create_table()
```````
数据库中的新记录:
```python3
从模型导入album
new_album=album(title=“hits”,artist=“deadmau5”,年份=2018)
新专辑.save()
```
>更新数据库中的记录:
```python3
upd`u album=album(title=“最受欢迎的歌曲”)
upd`u album.update(pk=1)
````
从数据库中删除记录:
``python3
del album=album()
del album.delete(pk=1)
```
简单快速的python orm。
[![许可证](https://img.shields.io/github/license/mashape/apistatus.svg?maxage=2592000)(https://github.com/maclinchy/oreopy/blob/master/license)
https://github.com/maclinchy/oreopy.git
cd oreopy
sudo python3 setup.py install
``
>
-
-
-
《入门入门
我们来创建一个名为“model s.py`
``python3
``python3
frooreopy.models import base
>frooreopy.fields import integerfield,textfield
class album(base.model)
br/>标题=textfield()
artist=textfield()
year=integerfield()
```````
数据库中的新记录:
```python3
从模型导入album
new_album=album(title=“hits”,artist=“deadmau5”,年份=2018)
新专辑.save()
```
>更新数据库中的记录:
```python3
upd`u album=album(title=“最受欢迎的歌曲”)
upd`u album.update(pk=1)
````
从数据库中删除记录:
``python3
del album=album()
del album.delete(pk=1)
```