rahmonov / alcazar Goto Github PK
View Code? Open in Web Editor NEWPython Web Framework built for learning purposes
Home Page: http://rahmonov.me/posts/write-python-framework-part-one/
Python Web Framework built for learning purposes
Home Page: http://rahmonov.me/posts/write-python-framework-part-one/
hi , i was testing the framework and working on orm part
i just made a table , creating tables is okay but the problem is with saving the instances to it
Here's the code :
from alcaraz.orm import Database , Table , Column
db = Database("./test.db")
class Category(Table):
Name = Column(str)
db.create(Category)
until this part evrything is working correctly but the problem is when im trying to save an object to it :
test = Category(name="Test")
db.save(test)
error : cursor = self.conn.execute(sql, values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.ProgrammingError: Error binding parameter 1: type 'Column' is not supported
how can i solve it , is it related to version confilicts?
Tnx
Any way to integrate or add database functionality in this?
web_1 | [2020-07-02 09:32:45 +0000] [1] [INFO] Starting gunicorn 20.0.4
web_1 | [2020-07-02 09:32:45 +0000] [1] [INFO] Listening at: http://127.0.0.1:8000 (1)
web_1 | [2020-07-02 09:32:45 +0000] [1] [INFO] Using worker: sync
web_1 | [2020-07-02 09:32:45 +0000] [7] [INFO] Booting worker with pid: 7
web_1 | [2020-07-02 09:32:45 +0000] [7] [ERROR] Exception in worker process
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
web_1 | worker.init_process()
web_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 119, in init_process
web_1 | self.load_wsgi()
web_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
web_1 | self.wsgi = self.app.wsgi()
web_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
web_1 | self.callable = self.load()
web_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
web_1 | return self.load_wsgiapp()
web_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
web_1 | return util.import_app(self.app_uri)
web_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
web_1 | mod = importlib.import_module(module)
web_1 | File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
web_1 | return _bootstrap._gcd_import(name[level:], package, level)
web_1 | File "", line 1014, in _gcd_import
web_1 | File "", line 991, in _find_and_load
web_1 | File "", line 975, in _find_and_load_unlocked
web_1 | File "", line 671, in _load_unlocked
web_1 | File "", line 783, in exec_module
web_1 | File "", line 219, in _call_with_frames_removed
web_1 | File "/usr/src/app/code/app.py", line 5, in
web_1 | app()
web_1 | TypeError: call() missing 2 required positional arguments: 'environ' and 'start_response'
web_1 | [2020-07-02 09:32:45 +0000] [7] [INFO] Worker exiting (pid: 7)
web_1 | [2020-07-02 09:32:45 +0000] [1] [INFO] Shutting down: Master
web_1 | [2020-07-02 09:32:45 +0000] [1] [INFO] Reason: Worker failed to boot.
building_own_python_web_framework_web_1 exited with code 3
I have cloned this framework and want to build it locally and try to contribute. So after cloning it locally how can I run this framework without using pip install alcazar-... for example in first and second blog we were running this like, gunicorn app:app. Now how to do it at this level.
Is this an MVC Framework?
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.