kneufeld / alkali Goto Github PK
View Code? Open in Web Editor NEWa simple python database
License: MIT License
a simple python database
License: MIT License
Hi, sorry its me again! I just installed this package on my Manjaro OS with Pipenv.
28 import os
29
---> 30 from .storage import Storage, JSONStorage
31
32 import logging
ModuleNotFoundError: No module named 'alkali.storage'
Pipfile content:
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
ipython = "*"
alkali = "==0.7.2"
[requires]
python_version = "3.7"
├── alkali
│ ├── database.py
│ ├── fields.py
│ ├── init.py
│ ├── manager.py
│ ├── memoized_property.py
│ ├── metamodel.py
│ ├── model.py
│ ├── peekorator.py
│ ├── query.py
│ ├── reify.py
│ ├── relmanager.py
│ ├── signals.py
│ └── utils.py
Machine=Windows 10
Pipenv file contents:
`[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
mypy = "*"
[packages]
alkali = "*"
fcntl = "*"
pytest = "*"
[requires]
python_version = "3.6"`
Script:
from alkali import Database, FileStorage, JSONStorage, Storage, Model, fields
class BaseErx(Model):
id = fields.IntField(primary_key=True)
cid = fields.StringField()
prod_name=fields.StringField()
pref_route=fields.ForeignKey(Route)
class Route(Model):
route = fields.StringField()
if __name__ == "__main__":
db = Database(models=[BaseErx, Route], storage = JSONStorage, save_on_exit=True)
route=Route(route='PO')
route.save()
db.store()
b = BaseErx(id=1, cid="C12345", prod_name="test", pref_route = route)
b.save()
db.store()`
```
Does it support Windows??
Version 0.7.0
on pypi requires six==1.10.0
, which makes it incompatible with such popular tools like Jupyter or Ipython.
Hi,
We spoke earlier about a proposal to add another field, CategoryList.
It can be seen as a set of unique values that can be validated against at run time to make sure the correct data is being held there.
I checked out the SetField field on alkali, but it doesn't seem to include a way to pass allowable choices as the only choices available.
Specs:
fields.CategoryList
to call an instance and passes it a list or dict.Would you be interested?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.