Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rdch106/pysre
Python wrapper for Simple-RFC1738-Encoder
https://github.com/rdch106/pysre
javascript python-wrapper url-encoder
Last synced: about 1 month ago
JSON representation
Python wrapper for Simple-RFC1738-Encoder
- Host: GitHub
- URL: https://github.com/rdch106/pysre
- Owner: RDCH106
- License: gpl-3.0
- Created: 2017-06-12T15:17:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-10T15:42:53.000Z (about 6 years ago)
- Last Synced: 2024-10-13T09:15:07.725Z (2 months ago)
- Topics: javascript, python-wrapper, url-encoder
- Language: Python
- Size: 24.4 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pySRE
[![PyPI](https://img.shields.io/pypi/v/pySRE.svg)](https://pypi.python.org/pypi/pySRE)
[![PyPI](https://img.shields.io/pypi/pyversions/pySRE.svg)](https://pypi.python.org/pypi/pySRE)
[![PyPI](https://img.shields.io/pypi/l/pySRE.svg)](https://github.com/RDCH106/pySRE/blob/master/LICENSE)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/3c484020aae54e939eb6624087ccfd27)](https://www.codacy.com/app/RDCH106/pySRE?utm_source=github.com&utm_medium=referral&utm_content=RDCH106/pySRE&utm_campaign=badger)Experimental Python wrapper for **Simple-RFC1738-Encoder** written in JavasScript.
More info about Simple-RFC1738-Encoder: https://github.com/RDCH106/Simple-RFC1738-Encoder
### What can I do with pySRE?
- The same as original library of Simple-RFC1738-Encoder
### Installation
You can install or upgrade pySRE with:
`$ pip install pySRE --upgrade`
Or you can install from source with:
```
$ git clone https://github.com/RDCH106/pySRE.git --recursive
$ cd pySRE
$ python setup.py install
```### Quick example
```python
from pySRE import pySRE# Choose your Engine using:
# pySRE.SUPPORTED_ENGINES
#
# Example:
# pySRE.PySRC(pySRE.SUPPORTED_ENGINES.Node)pySRE = pySRE.PySRC() # automatically picks the best runtime
print("\nCurrrent engine: %s\n" % pySRE.execjs_engine)my_url = "http://mascandobits.es?fullname=Rubén de Celis Hernández"
print("Original URL: %s" % my_url)
my_url = pySRE.convert_to_url(my_url)
print("RFC1738 URL: %s" % my_url)
my_url = pySRE.convert_to_string(my_url)
print("Decoded RFC1738 URL: %s" % my_url)
my_url = pySRE.convert_to_url_with_utf8(my_url)
print("RFC1738 URL with UTF8: %s" % my_url)
my_url = pySRE.convert_to_string_with_utf8(my_url)
print("Decoded RFC1738 URL with UTF8: %s" % my_url)```