semvec/pypi-packages huggingface dataset:
dict-config-parser 1.0
A custom wrapper, written in python, for reading and writing ini files, using simple dictionaries.
Requires Python: >=3.5, <3.8
Keywords: config parser configparser

### ConfigParser
A custom wrapper, written for python's own configparser, for reading and writing ini files, using simple dictionaries.

Can be installed using the setup.py file and by using the pip module

    pip install dict-config-parser

##### Input arguments:


* config_file

As the name suggest, you can input the file name of the file, including the ini extension. 
You can also pass the path of the config file in this parameter.
  
* get_new_config 

This is a boolean flag, when True, the code would ask for a new config and overwrite the previous one.
  
* default_keys
  
A dictionary needs to be passed to this input parameter. The keys of the dictionary would become the section names of the config file, while the array of values, against those keys, would become the section keys in that particular section. (See the test case for understanding)
  
A sample default keys might look this.

keys = {'DATASET_PATH' : ['VOC' , 'COCO'],
        'MODEL_PATH'   : ['WEIGHTS', 'JSON']}'

                        
##### Usage:

You only have to pass through the input parameters and it would create a new file, if it doesn't already exist. 
This would create the required prompts on the command line and you can enter the values as needed.

    config = ConfigParser(config_file='config.ini', get_new_config=True, default_keys=keys)


After creating the file, you would need to run the run_config method, from the current object of the class, to read the values 
from the created config file and return the values in a two-tiered dictionary.

    config_dictionary = config.read_config()

The dictionary would have sections names, as its first tier keys and section key, as its second tier keys.
 
For example, if you passed the example default keys, you could get the value against 'JSON' key in the 'MODEL_PATH' section,
by the command 
 
    required_value = config_dictionary['MODEL_PATH']['JSON']
django-payments-razorpay 1.0
Razorpay provider for django-payments.

# Razorpay for django-payments

[![PyPi Release](https://img.shields.io/pypi/v/django-payments-razorpay.svg)](https://pypi.org/project/django-payments-razorpay/)
![python](https://img.shields.io/pypi/pyversions/django-payments-razorpay.svg)
[![Build Status](https://travis-ci.org/NyanKiyoshi/django-payments-razorpay.svg?branch=master)](https://travis-ci.org/NyanKiyoshi/django-payments-razorpay)
[![codecov](https://codecov.io/gh/NyanKiyoshi/django-payments-razorpay/branch/master/graph/badge.svg)](https://codecov.io/gh/NyanKiyoshi/django-payments-razorpay)

**WARNING:** only the paisa (INR) currency is supported by Razorpay as of now.

## Installation
Add `django-payments-razorpay` to your project requirements 
and/ or run the installation with:
```shell
pip install django-payments-razorpay
```


## Provider parameters
First of all, to create your API credentials, you need to go in your Razorpay account settings, 
then in the API Keys section ([direct link](https://dashboard.razorpay.com/#/app/keys)).

| Key          | Required | Type      | Description |
| ------------ | -------  | --------- | ----------- |
| `public_key` | Yes      | `string`  | Your Razorpay **key id**        |
| `secret_key` | Yes      | `string`  | Your Razorpay **secret key id** |
| `image`      | No       | `string`  | An absolute or relative link to your store logo |
| `name`       | No       | `string`  | Your store name |
| `prefill`    | No       | `boolean` | Pre-fill the email and customer's full name if set to `True` (disabled by default) |


## Example configuration

In your `settings.py` file, you can add the following keys or append the data to them:

```python
PAYMENT_VARIANTS = {
    'razorpay': ('django_payments_razorpay.RazorPayProvider', {
        'public_key': 'RAZORPAY_PUBLIC_KEY',
        'secret_key': 'RAZORPAY_SECRET_KEY'})}
```

Note: if you are using **Saleor**, you may want to add Razorpay to the checkout payment choices:

```python
CHECKOUT_PAYMENT_CHOICES = [
    ('razorpay', 'RazorPay')]
```


## Notes
1. Razorpay automatically capture the whole payment amount;
2. In test mode, you can use `4111 1111 1111 1111` (or any other valid credit card numbers) 
with any future expiry date and CVV to pay orders.