From bb51236d4723ba14a2a8848a8ef31fe5622add57 Mon Sep 17 00:00:00 2001 From: ersul4ik Date: Fri, 4 Jan 2019 14:07:27 +0600 Subject: [PATCH] Added the docs dir for use in read-docs --- README.md | 45 ++++++++++++++++++++++++++++++++++++++++++++- docs/index.rst | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 docs/index.rst diff --git a/README.md b/README.md index cf2872b..8aef329 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,49 @@ [![CircleCI](https://circleci.com/gh/ersul4ik/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. + +## Installation + +```console +$ pip install -U swc-registry +``` + +## Example +```python +from swc_registry import SWC + +swc = SWC('SWC-100') +print(swc.title) + +// Function Default Visibility +``` + + +## Behaviour + +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. + +### Get latest version +```python +from swc_registry import SWC + +swc = SWC('SWC-100', True) +print(swc.title) + +// Function Default Visibility +``` +## Contribution +# The Python SWC Registry Library + + +[![CircleCI](https://circleci.com/gh/ersul4ik/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 +79,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