mymusictaste / inpynamodb Goto Github PK
View Code? Open in Web Editor NEWPynamoDB asynchronous plugin
License: MIT License
PynamoDB asynchronous plugin
License: MIT License
Test failed on test_model.test_index_*
# on base.AsyncConnection.query
tbl = self.get_meta_table(table_name)
if tbl is None:
raise TableError("No such table: {0}".format(table_name))
if index_name:
hash_keyname = tbl.get_index_hash_keyname(index_name)
if not hash_keyname:
> raise ValueError("No hash key attribute for index: {0}".format(index_name))
E ValueError: No hash key attribute for index: uid_index
maybe related to: pynamodb/PynamoDB#316
order of overridden methods in classes inherited from PynamoDB should be same order with parent class.
Add DynamoDB's TTL feature
Trying to update a ListAttribute with a MapAttribute value. Some of the values in the MapAttribute have UnicodeAttribute with null=True, default="".
When initializing MapAttribute, the UnicodeAttributes mentioned above have string type "" in them, but when I try to add it to the ListAttribute through update, it raises the following error:
I think the values degenerate between the process from calling the update function to the dispatch. Not sure if this is Inpynamodb problem or pynamodb problem
Situation:
I have a global secondary index with a hash key and range key.
When I query the index using a certain hash key with a last evaluated key from a previous query,
I get the list of items that STARTS with the item of last evaluated key.
For example,
let the following list of items [a,b,c,d] be a hypothetical table that I have.
When I do limit = 1, then I get a.
When I do limit =1 and last_evaluated_key=last_evaluated_key of previous query(which is = to a as key), then I still get a.
When I do limit = 2, then I get [a,b].
When I do limit = 2 and last_evaluated_key=last_evaluated_key of previous query(which is = to b as key), then I get [b,c].
The issue does not occur on local secondary index. I am not sure about regular queries on the model itself.
Hi, I'd like to use it but want to be sure it is production-ready. I see no commits for 2 years. Does it work?
Currently, in the _get_connection(), new connection is established if there isn't a cached instance of TableConnection. However, this means that even when a new event loop is generated, the Model instances refer to the old connection which may have closed and therefore unable to perform any actions.
A hotfix would be to change the logic in the _get_connection() method to account for this.
But I think this might really have to do with the "session" denoted by the session_cls keyword argument when creating TableConnection. Something more elaborate / smooth can be done with this.
Now get_settings_value
from settings.py PynamoDB version was edited to pass tests.
Should find a way to solve this.
PROBLEM:
/Users/minjeongkim/.pyenv/versions/mmt-server-event/lib/python3.6/site-packages/pynamodb/attributes.py:232: UserWarning: `Model._get_attributes` is deprecated in favor of `Model.get_attributes` now
warnings.warn("`Model._get_attributes` is deprecated in favor of `Model.get_attributes` now")
apparently, used in /inpynamodb/indexes.py:94
, etc, ...
Currently, when we save an object with a UTCDatetimeAttribute, if the tzinfo is not set, it is assumed that the timezone is UTC 00:00. However, this results in incorrect time data, since if I have the default equal to datetime.datetime.now, then it automatically assumes UTC 00:00 when the location may not necessarily be where UTC is 00:00.
I see two solutions.
One: a hard requirement to give the tzinfo as the parameter - this would break some of the existing code but it will put responsibility on individual developers to specify the tzinfo.
Two: the UTCDatetimeAttribute figuring out the tzinfo of the current location instead of simply defaulting to 00:00. This would be a cleaner solution I believe.
I get the following warning at the end of executing the code
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x1193fa0d0>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x119419980>, 3.3025964)]']
connector: <aiohttp.connector.TCPConnector object at 0x1193fa050>
Should closing the aiobotocore client still be implemented or am I using it wrong?
with patch(PATCH_METHOD) as req:
req.side_effect = BotoCoreError . # This doesn't raise BotoCoreError exception.
await self.assertAsyncRaises(TableError, conn.create_table(self.test_table_name, **kwargs))
Situation:
Attempting to execute query on a global secondary index of a model.
Attempted query :
query = Promotion.artist_index.query(artist_id, Promotion.progress != "D"))
The query works with
Promotion.progress.startswith("D")
I am not sure what the problem might be. Please take a look into it when you have time. Thank you.
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.