Git Product home page Git Product logo

py-mongo-serializer's Introduction

Mongy (Monkey) Serializer

Serialize MongoDB documents to native Python datatypes that can then be easily rendered into JSON, XML or other content types.

I am aiming to make this an opensource project and hence looking for collaborators for improvements and feedback. You can raise a PR or add issues after which we can work together to resolve it.

Background

I started this for serializing MongoDB documents as part of one of my projects. However, as it progressed I had an impetus to move this as an independent Open Source work that can be leveraged by others.

The sole intention is to have a learning experience along with knowledge sharing plus community help.

TODO

  • ListField with nested composite fields returns list with None when max_depth=0.
  • Add support for document linking (ReferenceField?).
  • Memory profiling.
  • Concurrency.
  • Nested field exclusion.

Testing

Unittests are written within py-mongo-serializer/tests directory. You can run tests using docker as given below.

cd py-mongo-serializer

# create a .env file and add below environment variables.
MONGO_INITDB_DATABASE=Mongy
MONGO_INITDB_ROOT_USERNAME=<yourmongousername>
MONGO_INITDB_ROOT_PASSWORD=<yourmongopassword>
MONGO_HOST=mongy_mongo
MONGO_DATA_DIR=/data/db
MONGO_LOG_DIR=/dev/null

docker-compose build
docker-compose up

Contributors

py-mongo-serializer's People

Contributors

jayakrishnandingit avatar

Watchers

 avatar

py-mongo-serializer's Issues

Remove iterable protocol from serializer class.

I am not sure why I made the whole serializer class implement the iterator protocol. Let us take that out.

Instead, we can wrap the objects passed to the constructor with iter built-in function. Hopefully, this will reduce memory footprint.

Enable Ruff Linter

The code base does not have any linter at the moment. It would be nice to try out the new kid in the block Ruff

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.