You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, what a sweet piece of code... Thanks for making it!
I have a suggestion which might simplify your code tremendously without taking away any of its expressiveness: Let schema be initialized by an instance of Collection (the thing that get_mongo_cursor currently returns).
Using the library would be a whole hell of a lot easier because its clients could use the full range of MongoClientinitialization options. Also, collections could be specified flexibly.
Examples:
def every_schema(client):
for database in client.database_names():
db = client[database]
for collection in db.collection_names():
yield (database, collection, Schema(db[collection], limit=100).get_schema())
list(every_schema(MongoClient( ... )))
@allonhadaya Thanks a lot ! The proposal does sound useful and would definitely make the library more flexible for the user. Please go ahead and work on it if you feel like - we can update the library and ship it as a part of the next version.
First off, what a sweet piece of code... Thanks for making it!
I have a suggestion which might simplify your code tremendously without taking away any of its expressiveness: Let schema be initialized by an instance of Collection (the thing that
get_mongo_cursor
currently returns).Using the library would be a whole hell of a lot easier because its clients could use the full range of
MongoClient
initialization options. Also, collections could be specified flexibly.Examples:
Or:
Anyway, thanks for making this awesome code. I like how direct the implementation is!
I'd be happy to work on this proposal if you like the idea, or have any feedback.
The text was updated successfully, but these errors were encountered: