semvec/pypi-packages huggingface dataset:
python-toml 0.0.5
Toml
License: BSD

> 安装

```
pip install python-toml
```

> loads:

```
toml.loads(s, *args, **kwargs)
```


```

value = """
name = 'caixin'

[web]

    # ip = '127.0.0.1'
    ip = '127.0.0.1'
    
    [web.client]
    
        port = 22
        
    [web.server]
    
        port = 222
        test = ['ss', 'zz']
        test2 = [
            'sss',
            'zzz',
        ]
[redis]

    ip = '127.0.0.1'
    port = 6379
"""

print(toml.loads(value))

{
	'name': 'caixin',
	'web': {
		'ip': '127.0.0.1',
		'client': {
			'port': 22
		},
		'server': {
			'port': 222,
			'test': ['ss', 'zz'],
			'test2': ['sss', 'zzz']
		}
	},
	'redis': {
		'ip': '127.0.0.1',
		'port': 6379
	}
}
```

> load

```
toml.load(file, *args, **kwargs)
```
    
> dumps
```
toml.dumps(s, *args, **kwargs)
```


```
data = {
	'name': 'caixin',
	'web': {
		'ip': '127.0.0.1',
		'client': {
			'port': 22
		},
		'server': {
			'port': 222,
			'test': ['ss', 'zz'],
			'test2': ['sss', 'zzz']
		}
	},
	'redis': {
		'ip': '127.0.0.1',
		'port': 6379
	}
}

print(toml.dumps(data))

name = 'caixin'

[web]

    ip = '127.0.0.1'
    
    [web.client]
        port = 22
        
    [web.server]
        port = 222
        test = ['ss', 'zz']
        test2 = ['sss', 'zzz']
[redis]

    ip = '127.0.0.1'
    port = 6379

```

> dump

```
toml.dump(file, s, *args, **kwargs)
```
    
> write

```
toml.write(file, value, model='w', *args, **kwargs)
```
    
> read

```
toml.read(file, *args, **kwargs)
```