Comments (45)
Hello!
I'd love to add PostgreSQL support but it's not something I would feel confident doing right now as I don't work with that DB (not in Python at least). PostgreSQL support would be a fantastic opportunity for other contributors to jump in! There's a DataLayer interface in place already, ready to be abused. If somebody wants to help well, let's get in touch!
from eve.
I assume we can use flask-SqlAlchemy to kill several flies with one kill?
from eve.
Do you frequent any irc channels, skype, gtalk or something? So we can talk what would be involved in this.
from eve.
I'm interested, if only to help test. Not sure what I can do on the dev side.
from eve.
Here's a bounty - anyone that implements this properly gets a small VM at 6sync for three months! And you get to contribute to open source!
from eve.
I guess Flask-SqlAlchemy would work, although I'm not sure a full featured ORM is needed. Again, I'm out of my comfort zone here so I'm open to discussion, ideas and pull requests.
I've been amusing myself with the idea of an irc channel for Eve, but it seemed a bit overkill at this stage. Also, by keeping the discussion here we allow everybody interested to easily jump in with his/her opinions and ideas.
from eve.
I'm all for irc channel, let's go!
from eve.
I too am very interested in collaborating with anyone working with/on
Nicola's awesome API!!! :) Skype Group is excellent or perhaps Google
Hangout. IRC is great too especially if dev's are aware of it's existence.
Perhaps the Flask IRC channel is good place to hang.
On Tue, Feb 26, 2013 at 10:19 AM, Mario Đanić [email protected]:
I'm all for irc channel, let's go!
—
Reply to this email directly or view it on GitHubhttps://github.com/nicolaiarocci/eve/issues/17#issuecomment-14123448
.
from eve.
@inactivist hey man I'm sure you can lend a hand in one way or another!
from eve.
IRC channel is now on freenode #evehq :)
from eve.
the cat is out of the bag I guess
from eve.
Is it reasonable for SQL support to exclude dict
and list
(nested) schema data types?
from eve.
I think supporting whatever sqlalchemy supports is fine :)
On Friday, March 8, 2013, Michael Curry wrote:
Is it reasonable for SQL support to exclude dict and list schema data
types?—
Reply to this email directly or view it on GitHubhttps://github.com/nicolaiarocci/eve/issues/17#issuecomment-14626354
.
from eve.
@inactivist I guess we could get away with that, at least on initial release. Remember you can have your own custom data validator within the SQL subpackage (for reference, see the validator for the mongo subpackage).
from eve.
If someone would like to test/review - here is my initial implementation:
Tefnet@963769f
- sample usage https://gist.github.com/Tefnet/5399337
from eve.
@Tefnet If someone else will not pickup your branch, I would like to try it and add tests to it this weekend!
from eve.
@Tefnet at quick glance it looks like a great start! I'll review it later, thank you!
@kpanic please join in!
from eve.
A quick note (haven't looked at the code yet). It seems kind of awkward that one has to define the schema twice, one for SQLAlchemy and another in settings.py
.
from eve.
I don't find that particularly strange due to the way Eve works - however, one could write a script to translate the SQLAlchemy models and spit out Cerberus validation rules for settings.py.
from eve.
I've made simple decorator for SQLAlchemy model Tefnet@bfb3798
but there are a couple of problems:
- Sometimes it is hard to map SQLAlchemy property to eve schema (for example composite column property)
- Right now I don't know how it could be registered in app. The problem is that I think I need app.driver to setup models, but I get it from app instance when config/schema is already parsed.
from eve.
I wouldn't worry much about the double definition, not now at least. Agree with @mario however, a script would be a nice tool. @Tefnet I added some comments to your repo. Very encouraging, thank you!
from eve.
https://gist.github.com/Tefnet/5430309 simple demo with decorator for https://github.com/nicolaiarocci/eve/issues/45
from eve.
A WIP based on #45 related to SQLAlchemy tests:
branch: https://github.com/kpanic/eve/commits/sqlalchemy (might need a rebase from #45 )
settings: https://gist.github.com/kpanic/5431065
from eve.
Guys, let's push this properly - I have time this week, so let's meet up on IRC and at least finish something worthy of a release? :)
from eve.
Guys, you alive? :)
from eve.
Ping.
Has this gone anywhere? I would be interested in helping where I can. We might be able to use something like this at work so I could devote some time to getting SQLAlchemy up and running.
from eve.
Hi,
are you on irc @nZac? Let's talk!
Cheers.
from eve.
#python-eve right?
from eve.
Yup.
On Mon, Jul 15, 2013 at 5:17 PM, Nick Zaccardi [email protected]:
#python-eve right?
—
Reply to this email directly or view it on GitHubhttps://github.com/nicolaiarocci/eve/issues/17#issuecomment-20976637
.
from eve.
@nZac nZac around? :)
from eve.
This gist might help:
https://gist.github.com/alanhamlett/6604662
Model.to_dict
turns a Model (and it's relationships) into a Python dict ready for serializing
Model.set_columns
takes a dict and updates a Model (and it's relationships)
from eve.
What's the current status on this? Is only testing needed or is essential implementation work still missing?
from eve.
there's a guy on the mailing list who's willing to work on the branch and is looking for help. Another guy jumped in (via email).
I'm still interested in merging as soon as it is mature enough so everybody is welcome to chime in (maybe by answering to that message on the ML in the first place).
from eve.
I have also started to work on my fork - https://github.com/RedTurtle/eve/tree/sqlalchemy based on @Tefnet branch.
from eve.
@amleczko this is very interesting, consider getting in touch with the guys on the mailing list so maybe you can join efforts.
from eve.
Hello everybody, I just merged a huge PR to the SQLAlchemy branch. It brings the functionality almost on par (with some tests and refactoring) with current Eve 0.4-dev so you may all want to work on it.
Author's comment on the PR (#311)
I moved forward the SQLAlchemy branch to support all the changes happened to Eve since last commit to the branch, or at least the ones affecting the find methods of the data layer. The current state of the SQLAlchemy support is a bit of a regression since I haven't updated the previous implementations of the find_one and insert methods in the data layer to comply with Eve 0.4. Mostly though I kicked off some tests for SQL DBs by porting them from the get method tests of Mongo. Hopefully this means we can make progress on the branch a little faster.
For reference:
from eve.
All those interested, #321 (support for DELETE and lots of tests) was just merged to the SQLAlchemy branch.
Things are moving forward rather quickly now and I'd really appreciate if someone would code-review and/or contribute to the sql branch.
from eve.
- What is the best way/place to review the code?
- I have several questions regarding schema registration that are not code-review related but more general principles sqlalchemy branch is following; where should I ask/discuss them?
from eve.
@amleczko I invited the main sql contributor to join the mailing list. Also, #326 has just been merged to the sql branch.
from eve.
I'm the contributor to the merges to the SQL branch of Eve. I just applied to join the mailing list so we should be able to discuss this there soon.
Meanwhile...in the past few weeks I focused on getting to near feature parity with eve 0.4-dev and more importantly in porting the relevant integration tests to SQL.
I'm sure there is plenty of room for improvement in my implementation, especially for supporting features that are particular to SQL like composite primary keys. Here is a list of things I have planned for the immediate future or where people could focus:
- The most important thing at the moment would be to review the tests. They all pass but it would be nice to have someone go over them to make sure I haven't fooled myself here and there.
- There is A LOT of repeated code between the tests for Mongo and the tests for SQL. It would be nice to make them DRY so that new tests can be added easily to both extensions.
- General review of the extension code to see if anything can be simplified or improved. I moved pretty quickly in the past few weeks and I may have overlooked a better implementation.
from eve.
There is A LOT of repeated code between the tests for Mongo and the tests for SQL. It would be nice to make them DRY so that new tests can be added easily to both extensions.
👍 that would be also useful for elastic extension
from eve.
Hi. We are trying out the SQLAlchemy branch, and we're wondering if the filters feature are already integrated. If it is, we would like to know how they are invoked on the API (like how does the where query work?)
If in case it's not yet here, we would love to help out to contribute code, and also we would like to know if you guys have any preference as to how the where query should look like.
Cheers!
from eve.
Yes they are although only in the python form. I made no effort to support the Mongo query syntax.
This is an example request of a where filter in action:
http://127.0.0.1:5000/people/?where=firstname==George
where obviously firstname
is a column of the people
table/resource. Since I'm supporting the Python syntax any valid combination of conditionals and logical operators should work. Please let me know if you find any issues
from eve.
Status update: Python 3.4 compatibility has just been added with PR #382. Cheers!
from eve.
Also see PR #424 which I find very interesting.
from eve.
Related Issues (20)
- Is there a way to get jsonschema using the API? HOT 1
- Issue with query_objectid_as_string on Eve>=1.0.1 HOT 7
- Release HOT 1
- 422 UNPROCESSABLE ENTITY when using user_id and data_relation on PATCH HOT 1
- Render fails because recent version of Werkzeug has removed escape() method from utils HOT 6
- HATEOAS links are relative starting with Werkzeug 2.1; should be absolute for backward compatibility HOT 1
- Werkzeug utils has no attribute escape. HOT 1
- MongoDB auth related issue in MONGO_URI HOT 10
- Add support to release Linux aarch64 wheels HOT 2
- deleteitem_internal on media resource, KeyError: 'media'
- Tests fail with Flask 2.2 HOT 2
- etag generation fails if 'uuidRepresentation' is not set in MONGO_OPTIONS HOT 1
- Malformed Last Updated field HOT 7
- How to get in touch regarding a security concern HOT 1
- [Feature Request] One document Endpoint HOT 1
- pass var to a pipeline aggregation via url and regex HOT 1
- Replace vs Merge Update on PATCH
- CI failure: `mongo command not found` on ubuntu-latest (22.04)
- Tests folder in eve distribution HOT 3
- Type serialization does not work inside valuesrules or valueschema
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eve.