Metadata-Version: 2.5
Name: jobject
Version: 1.0.5
Summary: jobject: A dictionary replacement that gives additional access to data using C struct notation, just like JavaScript Objects
Project-URL: Source, https://github.com/ouroboroscoding/jobject
Project-URL: Tracker, https://github.com/ouroboroscoding/jobject/issues
Author-email: "Chris Nasr - Ouroboros Coding Inc." <chris@ouroboroscoding.com>
Maintainer-email: "Chris Nasr - Ouroboros Coding Inc." <chris@ouroboroscoding.com>
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# jobject
[![pypi version](https://img.shields.io/pypi/v/jobject.svg)](https://pypi.org/project/jobject)
![MIT License](https://img.shields.io/pypi/l/jobject.svg)

jobject: A dictionary replacement that gives additional access to data using C
struct notation, just like JavaScript Objects.

Please see [LICENSE](https://github.com/ouroboroscoding/config/blob/main/LICENSE)
for further information.

See [Releases](https://github.com/ouroboroscoding/config/blob/main/releases.md)
for changes from release to release.

## Installation
```bash
pip install jobject
```

## Import
```python
import jobject

my_dict = jobject({'one': 1, 'two': 2, 'three': 3})

print(my_dict.three) # prints '3'
```

## Inheritance
Because jobject extends dict it can be dropped into any code that requires
dict notation or iteration. Because of this, jobject makes sure any dictionary
instances that are passed to it are also converted into jobjects

```python
import jobject

my_dict = jobject({
	'one': {
		'two': {
			'three': 123
		}
	}
})

print(my_dict.one.two.three) # prints '123'
```

It will even follow lists to make sure everything under it is converted to a
jobject

```python
import jobject

my_dict = jobject({
	'array': [
		{'one': 1},
		{'two': 2},
		{'three': 3}
	]
})

print(my_dict[2].three) # prints '3'
```

This even includes data set after the fact

```python
import jobject

my_dict = jobject()

my_dict.test = {
	'one': [
		{'two': 2}
	]
}

print(my_dict.test.one[0].two) # prints '2'
print(my_dict['test']['one'][0]['two']) # prints '2'
```