semvec/pypi-packages huggingface dataset:
codeoptimist.yaml 0.2.0
YAML file inheritance with nested string replacement fields and conditional formatting.
Requires Python: >=3.8
Keywords: YAML

See https://github.com/CodeOptimist/rimworld-mod-description-tool for example inheritance.

```yaml
---
fruit1: &fruit1
  - name: 'Strawberry'
  - name: 'Apple'
  - name: 'Banana'

fruit1_names: &fruit1_names !each [ *fruit1, 'name' ]
fruit1_names_joined: !join [ ", ", *fruit1_names ]
fruit1_names_sliced: !each [ *fruit1, 'name', '{l|_,3}' ]

fruit2: &fruit2
  - property: &strawberry { common: 'Strawberry', scientific: 'Fragaria × ananassa' }
  - property: { common: 'Apple', scientific: 'Malus domestica' }
  - property: { common: 'Banana', scientific: 'Musa acuminata' }

fruit2_property: !each [ *fruit2, 'property' ]
fruit2_scientific_joined: !join [ ", ", !each [ *fruit2, 'property.scientific' ] ]

fruit3: &fruit3 !insert
  - [ *fruit1 ]
  - name: 'Pineapple'
fruit3_names: !each [ *fruit3, 'name' ]

has_dog: ~
dog: 'a dog named "[BRACKY]"'
has_cat: Yup
cat: 'a cat named "{{CURLY}}"'

matrix: &matrix !concat
  - [ 1, 2, 3 ]
  - [ 4, 5, 6 ]
  - [ 7, 8, 9 ]
float_matrix: !each [ *matrix, ~, '{l:.3f}' ]

fruit4: !merge
  <: *strawberry
  color: 'red'

# [text to format, expected literal result]
tests:
  - [ '{fruit1_names}', "['Strawberry', 'Apple', 'Banana']" ]
  - [ '{fruit1_names_joined}', 'Strawberry, Apple, Banana' ]
  - [ '{fruit1_names_sliced}', "['Str', 'App', 'Ban']" ]
  - [ '{fruit2_scientific_joined}', 'Fragaria × ananassa, Malus domestica, Musa acuminata' ]
  - [ '{fruit3_names}', "['Strawberry', 'Apple', 'Banana', 'Pineapple']" ]
  - [ '{dog}', 'a dog named "[BRACKY]"' ]
  - [ '{has_dog?={{dog}} is {dog}}', '' ]
  - [ '{cat}', 'a cat named "{CURLY}"' ]
  - [ '{has_cat?={{cat}} is {cat}}', '{cat} is a cat named "{CURLY}"' ]
  - [ '{has_cat?+ sure do.}', 'Yup sure do.' ]
  - [ '{optional?}', '' ]
  - [ '{matrix}', '[1, 2, 3, 4, 5, 6, 7, 8, 9]' ]
  - [ '{fruit4!e}', "{'common': 'Strawberry', 'scientific': 'Fragaria × ananassa', 'color': 'red'}" ]
  - [ '{float_matrix}', "['1.000', '2.000', '3.000', '4.000', '5.000', '6.000', '7.000', '8.000', '9.000']" ]
  - [ '{fruit1.name^Apple!e}', "{'name': 'Apple'}" ]
  - [ '{fruit2_property.common^Banana!e}', "{'common': 'Banana', 'scientific': 'Musa acuminata'}" ]
```
ura-token-pkg-chengguan 0.0.4
A small example to obtain URA API token.
Requires Python: >=3.6

# URA Token Package

This is a small example to obtain URA API token. 

## Register for your access key with [URA](https://www.ura.gov.sg/maps/api/reg.html)

## Example:
```python
import requests
import json

from ura_token import ura_token

u=ura_token.ura_token('<place your ura access key here>')

url="https://www.ura.gov.sg/uraDataService/invokeUraDS?service=Car_Park_Availability"
myobj = {'AccessKey': u.get_accesskey(), 'token': u.get_token(), 'User-Agent': 'Mozilla/5.0'}
resp = requests.post(url, headers=myobj)

print(json.dumps(resp.json()['Result'], indent=4))
```

Questions or bugs, please write to chengguan.teo@gmail.com.