diff --git a/README.md b/README.md index a58270f..6d8afda 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [![CircleCI](https://circleci.com/gh/SmartContractSecurity/SWC-registry-python.svg?style=svg)](https://circleci.com/gh/SmartContractSecurity/SWC-registry-python) +[![Documentation Status](https://readthedocs.org/projects/swc-registry-python/badge/?version=latest)](https://swc-registry-python.readthedocs.io/en/latest/?badge=latest) + ## Description Python library for accessing SWC-registry content. @@ -36,4 +38,4 @@ print(swc.title) // Function Default Visibility ``` -## Contribution \ No newline at end of file +## Contribution diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..927559c --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,40 @@ +Getting Started with swc-registry-python +======================================== + +SWC-registry-python is a python package for accessing SWC-registry content. + + +Quick start +----------- + +Assuming you have Python already: + +.. sourcecode:: bash + + $ pip install swc-registry + +Check the package work: + +.. sourcecode:: python + + from swc_registry import SWC + + swc = SWC('SWC-100') + print(swc.title) + + // Function Default Visibility + + +Get the latest content of SWC-registry +-------------------------------------- + +On first use of the SWC methods, the SWC registry is initialized from file (swc-definition.json) out cache. If user wants to get the latest information about SWC-registry he needs to pass the second argument of SWC class. + +.. sourcecode:: python + + from swc_registry import SWC + + swc = SWC('SWC-100', True) + print(swc.title) + + // Function Default Visibility \ No newline at end of file