3mcloud / falcano Goto Github PK
View Code? Open in Web Editor NEWA pythonic interface to Amazon's DynamoDB for single-table design
License: MIT License
A pythonic interface to Amazon's DynamoDB for single-table design
License: MIT License
I haven't confirmed with a test, however, from the code https://github.com/3mcloud/falcano/blob/master/falcano/attributes.py#L411 it seems as though my sets are being ordered. This would break certain scenarios.
UUIDs can't be sorted and I really need the order to exist. But, my set is rearranged and the stored data in dynamo is not what I expected. I would process my queue out of order.
Looking to get some help - I am trying to use this fork to implement a single table design in my python-based API.
Overall, works fine but when I store a Map Attribute field, the result in Dynamo seems like it's been serialised multiple times and looks incorrect (although valid in dynamo)
Comparison:
new = Item(hash_key=f'testItem#{id}', range_key="testRange#3749189f-3d4c-4937-b31a-924bc84b366c")
new.data = dict(hello="message", nested={"hello": "message"}, enabled=False, number=0)
Results in
"data": {
"M": {
"number": {
"M": {
"N": {
"N": "0"
}
}
},
"hello": {
"M": {
"S": {
"S": "message"
}
}
},
"nested": {
"M": {
"M": {
"M": {
"hello": {
"M": {
"S": {
"S": "message"
}
}
}
}
}
}
},
"enabled": {
"M": {
"BOOL": {
"BOOL": false
}
}
}
}
},
Creating the attribute manually via the console as Map attribute, this is what it looks like and what I'd expect the python code to do too.
"console": {
"M": {
"string": {
"S": "sdasda"
},
"number": {
"N": "0"
},
"map": {
"M": {
"boolean": {
"BOOL": false
}
}
}
}
}
What am I doing wrong?
Hi,
Came across the fork whilst trying to use PynamoDB for Single-table design.
I notice this project seems to be missing the BooleanAttribute attribute. Is there a reason for this?
Also, I find I am only able to define a model with both Kind and Type set as attributes of my model - it seems if I just use Kind, there is a code error which is looking for Type and if I just use type, then exceptions raise when there is no Kind.
Thanks
folcano is using the walrus operator that is only available since python 3.8, like at https://github.com/3mcloud/falcano/blob/master/falcano/model.py#L472
I tried following the basic index query usage example and I received this error. All of the other examples work fine though (basic write, basic get, transaction write, etc...)
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.