Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.6%) to scientific vocabulary
Keywords
json
python
serialization
validation
Last synced: 6 months ago
·
JSON representation
Repository
Python data serialization/validation library
Basic Info
- Host: GitHub
- Owner: maximkulkin
- License: mit
- Language: Python
- Default Branch: master
- Size: 306 KB
Statistics
- Stars: 36
- Watchers: 6
- Forks: 9
- Open Issues: 3
- Releases: 13
Topics
json
python
serialization
validation
Created over 9 years ago
· Last pushed over 1 year ago
Metadata Files
Readme
Changelog
License
README.rst
********
lollipop
********
.. image:: https://img.shields.io/pypi/l/lollipop.svg
:target: https://github.com/maximkulkin/lollipop/blob/master/LICENSE
:alt: License: MIT
.. image:: https://img.shields.io/travis/maximkulkin/lollipop.svg
:target: https://travis-ci.org/maximkulkin/lollipop
:alt: Build Status
.. image:: https://readthedocs.org/projects/lollipop/badge/?version=latest
:target: http://lollipop.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://img.shields.io/pypi/v/lollipop.svg
:target: https://pypi.python.org/pypi/lollipop
:alt: PyPI
Data serialization and validation library
Features
========
* flexible schema definition API with powerful type combinators
* data validation
* serialization/deserialization
* in-place deserialization
Example
=======
.. code-block:: python
from lollipop.types import Object, String, Date
from lollipop.validators import Length
from collections import namedtuple
from datetime import date
Person = namedtuple('Person', ['name'])
Book = namedtuple('Book', ['title', 'publish_date', 'author'])
PersonType = Object({
'name': String(validate=Length(min=1)),
}, constructor=Person)
BookType = Object({
'title': String(),
'publish_date': Date(),
'author': PersonType,
}, constructor=Book)
harryPotter1 = Book(
title='Harry Potter and the Philosopher\'s Stone',
publish_date=date(1997, 6, 26),
author=Person(name='J. K. Rowling')
)
# Dumping
BookType.dump(harryPotter1)
# => {'title': 'Harry Potter and the Philosopher\'s Stone',
# 'publish_date': '1997-06-26',
# 'author': {'name': 'J. K. Rowling'}}
# Loading
BookType.load({'title': 'Harry Potter and the Philosopher\'s Stone',
'publish_date': '1997-06-26',
'author': {'name': 'J. K. Rowling'}})
# => Book(title='Harry Potter and the Philosopher\'s Stone',
# publish_date=date(1997, 06, 26),
# author=User(name='J. K. Rowling'))
# Partial inplace loading
BookType.load_into(harryPotter1, {'publish_date': '1997-06-27'})
# => Book(title='Harry Potter and the Philosopher\'s Stone',
# publish_date=date(1997, 06, 27),
# author=User(name='J. K. Rowling'))
# Loading list of objects
List(BookType).load([
{'title': 'Harry Potter and the Philosopher\'s Stone',
'publish_date': '1997-06-26',
'author': {'name': 'J. K. Rowling'}},
{'title': 'Harry Potter and the Chamber of Secrets',
'publish_date': '1998-07-02',
'author': {'name': 'J. K. Rowling'}},
])
# => [Book(...), Book(...)]
# Validation
BookType.validate({
'title': 'Harry Potter and the Philosopher\'s Stone',
'author': {'name': ''},
})
# => {'author': {'name': 'Length should be at least 1'},
# 'publish_date': 'Value is required'}
Installation
============
::
$ pip install lollipop
Documentation
=============
Documentation is available at http://lollipop.readthedocs.io/ .
Requirements
============
- Python >= 2.6 or <= 3.6
Project Links
=============
- Documentation: http://lollipop.readthedocs.io/
- PyPI: https://pypi.python.org/pypi/lollipop
- Issues: https://github.com/maximkulkin/lollipop/issues
License
=======
MIT licensed. See the bundled `LICENSE `_ file for more details.
Owner
- Name: Maxim Kulkin
- Login: maximkulkin
- Kind: user
- Location: Northborough, MA, United States
- Company: Meta
- Website: http://paypal.me/MaximKulkin
- Twitter: maximkulkin
- Repositories: 63
- Profile: https://github.com/maximkulkin
GitHub Events
Total
- Pull request event: 1
Last Year
- Pull request event: 1
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Maxim Kulkin | m****n@g****m | 143 |
| Amitai | a****i@a****m | 5 |
| Maxim Kulkin | m****n | 3 |
| Vladimir Bolshakov | v****o@g****m | 3 |
| 9seconds | n****s@y****u | 2 |
| Ilya Kharin | a****m@g****m | 1 |
| Roman Bogorodskiy | b****y@g****m | 1 |
Committer Domains (Top 20 + Academic)
yandex.ru: 1
apstrktr.com: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 11
- Total pull requests: 68
- Average time to close issues: 21 days
- Average time to close pull requests: 2 months
- Total issue authors: 6
- Total pull request authors: 8
- Average comments per issue: 1.82
- Average comments per pull request: 0.15
- Merged pull requests: 63
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- maximkulkin (3)
- Ragsboss (2)
- pyloolex (2)
- ghost (2)
- boris-42 (1)
- jeremyschulman (1)
Pull Request Authors
- maximkulkin (56)
- amitaiporat (3)
- boris-42 (2)
- akscram (2)
- ayudin (2)
- vovanbo (2)
- 9seconds (2)
- novel (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 46,942 last-month
- Total dependent packages: 0
- Total dependent repositories: 4
- Total versions: 17
- Total maintainers: 1
pypi.org: lollipop
Data serialization and validation library
- Homepage: https://github.com/maximkulkin/lollipop
- Documentation: https://lollipop.readthedocs.io/
- License: MIT
-
Latest release: 1.1.8
published over 2 years ago
Rankings
Downloads: 2.5%
Dependent repos count: 7.5%
Average: 8.5%
Dependent packages count: 10.0%
Stargazers count: 10.7%
Forks count: 11.9%
Maintainers (1)
Last synced:
6 months ago
Dependencies
dev-requirements.txt
pypi
- pytest >=2.9 development
- tox >=1.5 development
docs/requirements.txt
pypi
- sphinx *
- sphinx-issues >=0.2.0
setup.py
pypi