-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from robshakir/packaging
Merge packaged pyangbind project - https://pypi.python.org/pypi/pyangbind/0.2.0
- Loading branch information
Showing
70 changed files
with
1,975 additions
and
1,682 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
*.pyc | ||
*.swp | ||
*.egg-info | ||
build/* | ||
dist/* | ||
tests/pyvirtualenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,28 @@ | ||
## Changelog | ||
|
||
25-05-2015 - rel.00: | ||
25-05-2015 - tag: rel.00: | ||
|
||
* Initial release of PyangBind outside of BT. | ||
|
||
09-06-2015 - rel.01-alpha.01: | ||
09-06-2015 - tag: rel.01-alpha.01: | ||
|
||
* Merge of xpath-helper-04 into master. | ||
* Support for leafref with XPath lookups. | ||
|
||
04-09-2015 - rel.02: | ||
04-09-2015 - tag: rel.02: | ||
|
||
* Merge of serialiser-11 into master. | ||
* Support for serialising to JSON, extensions, refactored xpathhelper, and a number of new types. | ||
* Support for serialising to JSON, extensions, refactored xpathhelper, and a number of new types. | ||
|
||
31-12-2015 - 0.1.0 | ||
|
||
* Adopt semantic versioning. | ||
* First release packaged for PyPi | ||
|
||
11-01-2016 - 0.1.3 | ||
|
||
* Final test release to PyPI's test repo. | ||
* To be released as 0.2.0. | ||
|
||
11-01-2016 - 0.2.0 | ||
* Released to PyPI. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## Contributing to PyangBind | ||
|
||
Contributions to PyangBind are very welcome, either directly via pull requests, or as feature suggestions or bug reports. | ||
|
||
A couple of requests: | ||
|
||
* Code style is currently intended to be PEP-8 compliant, however, rules E111, E114, E127 and E128 are ignored. The standard indentation in PyangBind code is 2 spaces (**not** 4), and continued lines are made to be subjectively aesthetically pleasing/readable. | ||
* Please run tests/run.sh and check that all the tests pass if you're changing code. New tests are much appreciated. If you'd like to use a different test framework, that's fine -- just please ensure that `TESTNAME/run.py` runs the tests. | ||
* If you have an issue with generated code/odd errors during build -- please do just e-mail this over or open an issue. If you can't share the YANG itself, then anonymised YANG is very welcome. | ||
* If you'd like to discuss the best design for a feature, or don't get how a feature fits in, please open an issue, or send e-mail. | ||
|
||
And most of all, thanks for contributions :-) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
include pyangbind/plugin/*.py | ||
include *.md | ||
include LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
PyangBind | ||
========= | ||
|
||
PyangBind is a plugin for pyang which converts YANG data models into a Python class hierarchy, such that Python can be used to manipulate data that conforms with a YANG model. | ||
|
||
This module provides the supporting classes and functions that PyangBind modules utilise, particularly: | ||
|
||
* pyangbind.base.PybindBase - which is the parent class inherited by all container or module YANG objects. | ||
|
||
* pyangbind.pybindJSON - which containers wrapper functions which can be used to help with serialisation of YANG to JSON. | ||
|
||
* pyangbind.serialise.pybindJSONEncoder - a class that can be used as a custom encoder for the JSON module to serialise PyangBind class hierarchies to JSON. | ||
|
||
* pyangbind.serialise.pybindJSONDecoder - a class that can be used as a custom decoder to load JSON-encoded instances of YANG models into a PyangBind class hierarchy. | ||
|
||
* pyangbind.xpathhelper.YANGPathHelper - a class which can have objects registered against it, and subsequently retrieved from it using XPATH expressions. This module also includes parent classes that can be used to implement other helper modules of this nature. | ||
|
||
* pyangbind.yangtypes: The various functions which generate python types that are used to represent YANG types, and some helper methods. | ||
|
||
- pyangbind.yangtypes.is_yang_list and is_yang_leaflist are self explainatory, but may be useful. | ||
|
||
- pyangbind.yangtypes.safe_name is used throughout PyangBind to determine how to map YANG element names into Python attribute names safely. | ||
|
||
- pyangbind.yangtypes.RestrictedPrecisionDecimalType - generates wrapped Decimal types that has a restricted set of decimal digits - i.e., can deal with fraction-digits arguments in YANG. | ||
|
||
- pyangbind.yangtypes.RestrictedClassType - generates types which wrap a 'base' type (e.g., integer) with particular restrictions. The restrictions are supplied as a dictionary, or with specific arguments if single restrictions are required. Currently, the restrictions supported are regexp matches, ranges, lengths, and restrictions to a set of values (provided as keys to a dict). | ||
|
||
- pyangbind.yangtypes.TypedListType - generates types which wrap a list to restrict the objects that it may contain. | ||
|
||
- pyangbind.yangtypes.YANGListType - generates types which wrap a class representing a container, such that it acts as a YANG list. | ||
|
||
- pyangbind.yangtypes.YANGBool - a boolean class. | ||
|
||
- pyangbind.yangtypes.YANGDynClass - generates types which consist of a wrapper (YANGDynClass) and a wrapped object which may be any other class. YANGDynClass is a meta-class that provides additional data on top of the attributes and functions of the wrapped class. | ||
|
||
- pyangbind.yangtypes.ReferenceType - generates types which can use a pyangbind.xpathhelper.PybindXpathHelper instance to look up values - particularly to support leafrefs in YANG. | ||
|
||
Usage documentation for PyangBind itself can be found on GitHub: https://github.com/robshakir/pyangbind |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Pyangbind/lib |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = "0.1.1" |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.