Skip to content

Commit

Permalink
update api reference #225
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickjaigner committed Jul 15, 2024
1 parent deb385e commit 121d65d
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
hide_table_of_contents: true
---

<!-- markdownlint-disable -->

# <kbd>module</kbd> `core.threads.thingsboard_thread`






---

## <kbd>class</kbd> `ThingsBoardThread`







---

### <kbd>method</kbd> `get_new_thread_object`

```python
get_new_thread_object() Thread
```

Return a new thread object that is to be started.

---

### <kbd>method</kbd> `main`

```python
main(headless: bool = False) None
```

Main entrypoint of the thread. In headless mode, don't write to log files but print to console.

---

### <kbd>method</kbd> `should_be_running`

```python
should_be_running(config: Config) bool
```

Based on the config, should the thread be running or not?


66 changes: 66 additions & 0 deletions packages/docs/docs/api-reference/core/types/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,72 @@ Returns the set of fields that have been explicitly set on this model instance.
Like `UploadConfig`, but all fields are optional.


---

#### <kbd>property</kbd> model_extra

Get extra fields set during validation.



**Returns:**
A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.

---

#### <kbd>property</kbd> model_fields_set

Returns the set of fields that have been explicitly set on this model instance.



**Returns:**
A set of strings representing the fields that have been set, i.e. that were not filled from defaults.




---

## <kbd>class</kbd> `ThingsBoardConfig`





---

#### <kbd>property</kbd> model_extra

Get extra fields set during validation.



**Returns:**
A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.

---

#### <kbd>property</kbd> model_fields_set

Returns the set of fields that have been explicitly set on this model instance.



**Returns:**
A set of strings representing the fields that have been set, i.e. that were not filled from defaults.




---

## <kbd>class</kbd> `PartialThingsBoardConfig`





---

#### <kbd>property</kbd> model_extra
Expand Down

0 comments on commit 121d65d

Please sign in to comment.