pyserializer User Documentation¶
pyserializer¶
pyserializer is a simple Python serialization/deserialization library. It is an ORM agnostic library for converting Python objects to native Python datatypes, and vice versa.
Installation¶
pyserializer is available on PyPI, so to use it you can use pip:
To install pyserializer, simply run:
$ pip install pyserializer
Alternatively, if you don’t have setuptools installed, download it from PyPi and run:
$ python setup.py install
Also, you can get the source from GitHub and install it as above:
$ git clone https://github.com/localmed/pyserializer.git
$ cd pyserializer
$ python setup.py install
- Serialization
- A quick serialization example. Shows examples on how to define your serializer class and serialize a python object to native datatype.
- Deserialization
- A quick deserialization example. Shows examples on how to define your deserializer class and deserialize a native datatype to python object.
- Validation
- A quick validation example. Shows examples on how to define validators on your field and check errors encountered diring validation process.
- Fields
- A list of currently supported fields.
- Custom Error Messages
- A quick example on how to set custom error messages on fields.
- Custom Fields
- A quick example on how you can create custom fields.
- Custom Validators
- A quick example on how you can create custom validators.
- API Reference
- The complete API documentation.
- Changelog
- A documentation for changelogs between versions.
Contribute¶
Always looking for contributions, additions and improvements.
The source is available on GitHub and contributions are always encouraged.
To contribute, fork the project on GitHub and submit a pull request. If you have notices bugs or issues with the library, you can add it to the Issue Tracker.
Install development requirements. It is highly recommended that you use a virtualenv, and activate the virtualenv before installing the requirements.
Install project requirements:
$ pip install -r requirements.txt
Run tests with coverage:
$ make unit_test
Run test Using Tox (Runs the tests in different supported python interpreter):
$ tox
Run Lint:
$ make lint
Create a new local branch to submit a pull request:
$ git checkout -b name-of-feature
Commit your changes:
$ git commit -m "Detailed commit message"
Push up your changes:
$ git push origin name-of-feature
Submit a pull request. Before submitting a pull request, make sure pull request add the functionality, it is tested and docs are updated.