Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2a9b738
Implement caching mechanism and add Dictionaries module with CRUD ope…
mateuscardosodeveloper May 5, 2025
e18a37f
Add unit tests for Dictionaries module methods in test_dictionaries.py
mateuscardosodeveloper May 5, 2025
9c83791
Add Dictionaries documentation and update Resources index
mateuscardosodeveloper May 5, 2025
547357b
Fix parameter filtering in _converter_dict_param_filter method to ens…
mateuscardosodeveloper May 5, 2025
836d327
Remove unused Tuple import from Cache.py
mateuscardosodeveloper May 5, 2025
0def38f
Add Files module and integrate into Resources; update TagoIOModule pa…
mateuscardosodeveloper May 6, 2025
26b4978
Add test suite for Files module with various mock methods and assertions
mateuscardosodeveloper May 6, 2025
dfbecf7
Add Files Type documentation and update Resources index
mateuscardosodeveloper May 6, 2025
feaeda8
Refactor file upload handling in Files module and improve UploadOptio…
mateuscardosodeveloper May 6, 2025
86b02cf
Add IntegrationConnector and IntegrationConnectorType modules with co…
mateuscardosodeveloper May 6, 2025
8ee63cd
Add IntegrationConnector documentation and update Resources index
mateuscardosodeveloper May 6, 2025
060331a
Add tests for Connectors class methods in test_integration_connector.py
mateuscardosodeveloper May 6, 2025
df94233
Remove unused import of Any from IntegrationConnector module
mateuscardosodeveloper May 6, 2025
822b720
Add Notifications module and integrate it into Resources and AccountD…
mateuscardosodeveloper May 8, 2025
a5d2495
Add tests for Notifications class methods in test_notifications.py
mateuscardosodeveloper May 8, 2025
c4cf7af
Add detailed documentation for Notification types and update Resource…
mateuscardosodeveloper May 8, 2025
1123975
Add requests-toolbelt as a dependency in pyproject.toml
mateuscardosodeveloper May 9, 2025
4fa23fb
Refactor multipart upload handling in Files module to use requests-to…
mateuscardosodeveloper May 9, 2025
8773cd8
Refactor dev-dependencies section in pyproject.toml to use group.dev.…
mateuscardosodeveloper May 9, 2025
ae091e0
Add Secrets module and integrate it into Resources and AccountDeprecated
mateuscardosodeveloper May 12, 2025
2ad831f
Add tests for Secrets class methods in test_secrets.py
mateuscardosodeveloper May 12, 2025
f0b5e69
Add documentation for Secrets module and create index entries for Sec…
mateuscardosodeveloper May 12, 2025
8ca0486
Add ServiceAuthorization module and integrate it into Resources and A…
mateuscardosodeveloper May 12, 2025
df59926
Add tests for ServiceAuthorization methods including tokenList, token…
mateuscardosodeveloper May 12, 2025
fc8d45c
Add ServiceAuthorization documentation and integrate into Resources i…
mateuscardosodeveloper May 12, 2025
40dbbb4
Refactor import statement in ServiceAuthorization module to remove un…
mateuscardosodeveloper May 12, 2025
70a13ae
Merge pull request #47 from tago-io/feat/add-service-authorization-cl…
felipefdl Jul 26, 2025
e820d82
Merge pull request #46 from tago-io/feat/add-secrets-class/SDKPY-128
felipefdl Jul 26, 2025
4ef9ffa
Merge pull request #45 from tago-io/feat/add-notifications-class/SDKP…
felipefdl Jul 26, 2025
da446cd
Merge pull request #44 from tago-io/feat/add-connectors-class/SDKPY-126
felipefdl Jul 26, 2025
289550f
Merge pull request #43 from tago-io/feat/add-files-class/SDKPY-125
felipefdl Jul 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions docs/source/Resources/Dictionaries/Dictionaries_Type.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
**Dictionaries Type**
=====================


.. _DictionaryCreateInfo:

DictionaryCreateInfo
-------------------

**Attributes:**

| name: str
| Name of the dictionary.

| slug: str
| Unique identifier slug for the dictionary.

| fallback: str
| First dictionary language E.g "en-US"


.. _DictionaryLanguage:

DictionaryLanguage
-----------------

**Attributes:**

| code: str
| Language code E.g "en-US"

| active: bool
| Indicates if the language is active.


.. _DictionaryInfo:

DictionaryInfo(:ref:`DictionaryCreateInfo`)
-------------

**Attributes:**

| id: :ref:`GenericID`
| Unique identifier for the dictionary.

| languages: List[:ref:`DictionaryLanguage`]
| List of languages supported by the dictionary.

| created_at: datetime
| Date and time when the dictionary was created.

| updated_at: datetime
| Date and time when the dictionary was last updated.


.. _LanguageData:

LanguageData
-----------

**Attributes:**

| Dict[str, str]
| Dictionary of key-value pairs for translations.


.. _LanguageEditData:

LanguageEditData
--------------

**Attributes:**

| dictionary: :ref:`LanguageData`
| The dictionary containing the translations.

| active: bool
| Indicates if the language is active.


.. _LanguageInfoQuery:

LanguageInfoQuery
---------------

**Attributes:**

| fallback: Optional[bool]
| Whether to return fallback language data if requested language is not found.


.. _DictionaryQuery:

DictionaryQuery(:ref:`Query`)
--------------

**Attributes:**

| fields: Optional[Literal["name", "slug", "languages", "fallback", "created_at", "updated_at"]]
| List of fields to include in the query results.

| filter: Optional[:ref:`DictionaryInfo`]
| Filter criteria for the query.
289 changes: 289 additions & 0 deletions docs/source/Resources/Dictionaries/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,289 @@
**Dictionaries**
==========

Manage dictionaries in your application.

========
list
========

Lists all dictionaries from your application with pagination support.

See: `Dictionaries <https://help.tago.io/portal/en/kb/articles/487-dictionaries>`_

**Parameters:**

| *Optional* **queryObj**: :ref:`DictionaryQuery`
| Query parameters to filter the results.

.. code-block::
:caption: **Default queryObj:**

queryObj = {
"page": 1,
"fields": ["id", "name", "slug", "languages"],
"filter": {},
"amount": 20,
"orderBy": ["name", "asc"]
}

**Returns:**

| list[:ref:`DictionaryInfo`]

.. code-block:: python

from tagoio_sdk import Resources

resources = Resources()
result = resources.dictionaries.list({
"page": 1,
"fields": ["id", "name", "slug"],
"amount": 10,
"orderBy": ["name", "asc"]
})
print(result) # [{'id': 'dictionary-id-123', 'name': 'My Dictionary', 'slug': 'DICT'}, ...]


========
create
========

Creates a new dictionary in your application.

See: `Using Dictionaries (Multi-Language) <https://help.tago.io/portal/en/kb/articles/489-using-dictionaries-multi-language>`_

**Parameters:**

| **dictionaryObj**: :ref:`DictionaryCreateInfo`
| Dictionary information

**Returns:**

| dict

.. code-block:: python

from tagoio_sdk import Resources

resources = Resources()
result = resources.dictionaries.create({
"name": "My Dictionary",
"slug": "DICT",
})
print(result["dictionary"]) # dictionary-id-123


========
edit
========

Modifies an existing dictionary's properties.

See: `Using Dictionaries (Multi-Language) <https://help.tago.io/portal/en/kb/articles/489-using-dictionaries-multi-language>`_

**Parameters:**

| **dictionaryID**: str
| Dictionary ID

| **dictionaryObj**: dict
| Dictionary information to update

**Returns:**

| string

.. code-block:: python

from tagoio_sdk import Resources

resources = Resources()
result = resources.dictionaries.edit("dictionary-id-123", {
"name": "Updated Dictionary",
})
print(result) # Successfully Updated


========
delete
========

Deletes a dictionary from your application.

See: `Using Dictionaries (Multi-Language) <https://help.tago.io/portal/en/kb/articles/489-using-dictionaries-multi-language>`_

**Parameters:**

| **dictionaryID**: str
| Dictionary ID

**Returns:**

| string

.. code-block:: python

from tagoio_sdk import Resources

resources = Resources()
result = resources.dictionaries.delete("dictionary-id-123")
print(result) # Successfully Removed


========
info
========

Retrieves detailed information about a specific dictionary.

See: `Dictionaries <https://help.tago.io/portal/en/kb/articles/487-dictionaries>`_

**Parameters:**

| **dictionaryID**: str
| Dictionary ID

**Returns:**

| :ref:`DictionaryInfo`

.. code-block:: python

from tagoio_sdk import Resources

resources = Resources()
result = resources.dictionaries.info("dictionary-id-123")
print(result) # {'id': 'dictionary-id-123', 'name': 'My Dictionary', 'slug': 'DICT', 'languages': ['en-US'], ...}


===========
languageEdit
===========

Edits a language's content in a dictionary.

See: `Using Dictionaries (Multi-Language) <https://help.tago.io/portal/en/kb/articles/489-using-dictionaries-multi-language>`_

**Parameters:**

| **dictionaryID**: str
| Dictionary ID

| **locale**: str
| Language code

| **languageObj**: :ref:`LanguageEditData`
| Language data to update

**Returns:**

| string

.. code-block:: python

from tagoio_sdk import Resources

resources = Resources()
result = resources.dictionaries.languageEdit("dictionary-id-123", "en-US", {
"dictionary": {"HELLO": "Hello"},
"active": True
})
print(result) # Dictionary language Successfully Updated


===========
languageDelete
===========

Removes a language from a dictionary.

See: `Using Dictionaries (Multi-Language) <https://help.tago.io/portal/en/kb/articles/489-using-dictionaries-multi-language>`_

**Parameters:**

| **dictionaryID**: str
| Dictionary ID

| **locale**: str
| Language code

**Returns:**

| string

.. code-block:: python

from tagoio_sdk import Resources

resources = Resources()
result = resources.dictionaries.languageDelete("dictionary-id-123", "en-US")
print(result)


===========
languageInfo
===========

Retrieves language-specific content from a dictionary by ID.

See: `Dictionaries <https://help.tago.io/portal/en/kb/articles/487-dictionaries>`_

**Parameters:**

| **dictionaryID**: str
| Dictionary ID

| **locale**: str
| Language code

| *Optional* **queryObj**: :ref:`LanguageInfoQuery`
| Query options

**Returns:**

| :ref:`LanguageData`

.. code-block:: python

from tagoio_sdk import Resources

resources = Resources()
result = resources.dictionaries.languageInfo("dictionary-id-123", "en-US", {
"fallback": True
})
print(result) # {'ACCEPT': 'Accept', 'ACCEPTED': 'Accepted', ...}


=================
languageInfoBySlug
=================

Retrieves language-specific content from a dictionary by its slug.

See: `Dictionaries <https://help.tago.io/portal/en/kb/articles/487-dictionaries>`_

**Parameters:**

| **slug**: str
| Dictionary slug

| **locale**: str
| Language code

| *Optional* **queryObj**: :ref:`LanguageInfoQuery`
| Query options

**Returns:**

| :ref:`LanguageData`

.. code-block:: python

from tagoio_sdk import Resources

resources = Resources()
result = resources.dictionaries.languageInfoBySlug("SLUG", "en-US", {
"fallback": True
})
print(result)
Loading