Python wrapper for eRail API.
Project description
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Description: |block| PyeRail : eRail python wrapper
=============================================
.. |block| image:: http://api.erail.in/images/eRail196x196.png
:width: 20px
:height: 20px
**What is it?**
****************
PyeRail is a Python wrapper for the eRail web API.
It allows quick and easy comsumption of eRail API from your Python applicatuon.
PyeRail reqires Python 3.
**Install**
***********
You can install pyerail using:
.. code ::
$ pip3 install pyerail
Build from source
.. code ::
$ git clone https://github.com/aksbuzz/PyeRail.git
$ cd PyeRail
$ make
**Usage**
*********
*API Key*
^^^^^^^^^
For access to the eRail API you would need a API Key.
You can get the API Key from here http://api.erail.in/
*Using the module*
^^^^^^^^^^^^^^^^^^
Creating an instance object of class
.. code :: python
>>> from pyerail import Erail
>>> eRail = Erail(api_key)
Getting details of given PNR number
.. code :: python
>>> eRail.pnr(your_pnr_number)
In any case the object returns
"status" and "result"
**Examples**
************
You can find example usage in the examples folder.
**Contribution**
****************
Contributions are welcome!.
**Documentation**
*****************
Documentation at http://api.erail.in/
**Todo**
********
- Add Python 2 support
- Add detailed documentation
Platform: UNKNOWN
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Description: |block| PyeRail : eRail python wrapper
=============================================
.. |block| image:: http://api.erail.in/images/eRail196x196.png
:width: 20px
:height: 20px
**What is it?**
****************
PyeRail is a Python wrapper for the eRail web API.
It allows quick and easy comsumption of eRail API from your Python applicatuon.
PyeRail reqires Python 3.
**Install**
***********
You can install pyerail using:
.. code ::
$ pip3 install pyerail
Build from source
.. code ::
$ git clone https://github.com/aksbuzz/PyeRail.git
$ cd PyeRail
$ make
**Usage**
*********
*API Key*
^^^^^^^^^
For access to the eRail API you would need a API Key.
You can get the API Key from here http://api.erail.in/
*Using the module*
^^^^^^^^^^^^^^^^^^
Creating an instance object of class
.. code :: python
>>> from pyerail import Erail
>>> eRail = Erail(api_key)
Getting details of given PNR number
.. code :: python
>>> eRail.pnr(your_pnr_number)
In any case the object returns
"status" and "result"
**Examples**
************
You can find example usage in the examples folder.
**Contribution**
****************
Contributions are welcome!.
**Documentation**
*****************
Documentation at http://api.erail.in/
**Todo**
********
- Add Python 2 support
- Add detailed documentation
Platform: UNKNOWN
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyerail-0.2.1.tar.gz
(4.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyerail-0.2.1.tar.gz.
File metadata
- Download URL: pyerail-0.2.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a94545ec12de79852eadb75577cfb81b803b1b192a54460a251a33b7eb0dd308
|
|
| MD5 |
d8d2d7958e1013a08d35ba7d5773d91f
|
|
| BLAKE2b-256 |
b01de211bf5897b43d5e5a76cf5eb4fbb0a9f8de985260c52e100c337cc4f0a9
|
File details
Details for the file pyerail-0.2.1-py2.py3-none-any.whl.
File metadata
- Download URL: pyerail-0.2.1-py2.py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8330286dc5bced503c8f2f61e1acf53ef3031eb472d83ac90c68895949a36fcf
|
|
| MD5 |
8cc58bd6b16f2431cac3630c29b89d39
|
|
| BLAKE2b-256 |
28a3f9194ba00e6b859555b1d810b0c378f74ac32f31b39528a50736ec0a14f9
|