Skip to content

Commit ead145c

Browse files
Rename agent package (#115)
1 parent 5a514d7 commit ead145c

20 files changed

Lines changed: 30 additions & 27 deletions

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Insights server.
55

66
## Usage
77

8-
### Custom source interactions
8+
### Importing data to custom sources
99

1010
The following snippet shows how to authenticate as a custom source and create a connector log at an Elimity Insights
1111
server. You can generate a source identifier and token by visiting the custom source's detail page in Elimity Insights
@@ -26,14 +26,14 @@ if __name__ == "__main__":
2626
client.create_connector_logs(logs)
2727
```
2828

29-
### Agent interactions
29+
### Other API interactions
3030

31-
This module also provides a client for agent interactions with Elimity Insights. The snippet below shows how to
32-
authenticate as an agent and list sources at an Elimity Insights server. You can generate a token identifier and
31+
This module also provides a client for other API interactions with Elimity Insights. The snippet below shows how to
32+
authenticate with an API token and list sources at an Elimity Insights server. You can generate a token identifier and
3333
secret by visiting the 'API tokens' page in Elimity Insights and clicking the 'CREATE API TOKEN' button.
3434

3535
```python3
36-
from elimity_insights_client.agent.api import Config, sources
36+
from elimity_insights_client.api import Config, sources
3737

3838
if __name__ == "__main__":
3939
config = Config(token_id="1", token_secret="my-secret-value", url="https://example.elimity.com", verify_ssl=True)

src/elimity_insights_client/agent/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""Elimity Insights client for API interactions."""
2+
from elimity_insights_client.api._api import Config, query, sources
3+
4+
__all__ = ["Config", "query", "sources"]
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
"""API endpoints for agent interactions with an Elimity Insights server."""
1+
"""Endpoints for API interactions with an Elimity Insights server."""
22

33
from dataclasses import dataclass
44
from typing import List, TypeVar, cast, Type, Optional
55

66
from requests import request
77

88
from elimity_insights_client._util import encoder, map_list
9-
from elimity_insights_client.agent._decode_query_results_page import (
9+
from elimity_insights_client.api._decode_query_results_page import (
1010
decode_query_results_page,
1111
QueryResultsPageDict,
1212
)
13-
from elimity_insights_client.agent._decode_source import SourceDict, decode_source
14-
from elimity_insights_client.agent.query import Query
15-
from elimity_insights_client.agent.query_results_page import QueryResultsPage
16-
from elimity_insights_client.agent._encode_query import encode_query
17-
from elimity_insights_client.agent.source import Source
13+
from elimity_insights_client.api._decode_source import SourceDict, decode_source
14+
from elimity_insights_client.api.query import Query
15+
from elimity_insights_client.api.query_results_page import QueryResultsPage
16+
from elimity_insights_client.api._encode_query import encode_query
17+
from elimity_insights_client.api.source import Source
1818

1919

2020
@dataclass
2121
class Config:
22-
"""Configuration consisting of agent credentials and connection properties."""
22+
"""Configuration consisting of API credentials and connection properties."""
2323

2424
token_id: str
2525
token_secret: str

src/elimity_insights_client/agent/_decode_query_results_page.py renamed to src/elimity_insights_client/api/_decode_query_results_page.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from typing_extensions import TypedDict
55

66
from elimity_insights_client._util import map_list
7-
from elimity_insights_client.agent.query_results_page import (
7+
from elimity_insights_client.api.query_results_page import (
88
QueryResultsPage,
99
QueryResult,
1010
Entity,

src/elimity_insights_client/agent/_decode_source.py renamed to src/elimity_insights_client/api/_decode_source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
DomainGraphSchemaDict,
77
decode_domain_graph_schema,
88
)
9-
from elimity_insights_client.agent.source import (
9+
from elimity_insights_client.api.source import (
1010
Source,
1111
LastReloadTimestamp,
1212
AbsentLastReloadTimestamp,

src/elimity_insights_client/agent/_encode_expression.py renamed to src/elimity_insights_client/api/_encode_expression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from typing import List, TypeVar, Callable
33

44
from elimity_insights_client._util import encode_datetime, local_timezone
5-
from elimity_insights_client.agent.expression import (
5+
from elimity_insights_client.api.expression import (
66
BooleanExpression,
77
ActiveBooleanExpression,
88
AllBooleanExpression,

src/elimity_insights_client/agent/_encode_query.py renamed to src/elimity_insights_client/api/_encode_query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
from elimity_insights_client.agent._encode_expression import (
1+
from elimity_insights_client.api._encode_expression import (
22
encode_boolean_expression,
33
encode_date_expression,
44
encode_date_time_expression,
55
encode_number_expression,
66
encode_string_expression,
77
encode_time_expression,
88
)
9-
from elimity_insights_client.agent.query import (
9+
from elimity_insights_client.api.query import (
1010
DirectLinkQuery,
1111
Ordering,
1212
LinkGroupByQuery,
File renamed without changes.

src/elimity_insights_client/agent/query.py renamed to src/elimity_insights_client/api/query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from enum import Enum, auto
55
from typing import Union, List
66

7-
from elimity_insights_client.agent.expression import (
7+
from elimity_insights_client.api.expression import (
88
BooleanExpression,
99
DateExpression,
1010
DateTimeExpression,

0 commit comments

Comments
 (0)