dhisana 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dhisana-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.1
2
+ Name: dhisana
3
+ Version: 0.1.0
4
+ Summary: A Python SDK for Dhisana AI Platform
5
+ Home-page: https://github.com/dhisana-ai/dhisana-python-sdk
6
+ Author: Admin
7
+ Author-email: contact@dhisana.ai
8
+ License: MIT
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Requires-Python: >=3.8
14
+ Requires-Dist: bs4
15
+ Requires-Dist: click>=7.0
16
+ Requires-Dist: fastapi
17
+ Requires-Dist: google-api-python-client
18
+ Requires-Dist: google-auth
19
+ Requires-Dist: openai
20
+ Requires-Dist: playwright
21
+ Requires-Dist: requests
22
+ Requires-Dist: uvicorn[standard]
@@ -0,0 +1,139 @@
1
+ # Dhisana Python SDK
2
+
3
+ A Python SDK for interacting with Dhisana AI services.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install dhisana
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```python
14
+ from dhisana.utils.agent_tools import (
15
+ search_google_maps,
16
+ enrich_people_with_apollo,
17
+ search_google,
18
+ search_google_jobs,
19
+ search_google_news,
20
+ get_html_content_from_url,
21
+ parse_html_content,
22
+ extract_image_links,
23
+ extract_head_section_from_html_content,
24
+ get_email_if_exists,
25
+ search_crunchbase,
26
+ search_people_with_apollo,
27
+ search_companies_with_apollo,
28
+ enrich_company_with_apollo,
29
+ get_job_postings_from_apollo
30
+ )
31
+ # Your code here
32
+ ```
33
+
34
+ ## Steps to Create and Publish the Package
35
+
36
+ ### Ensure you have the latest versions of setuptools and wheel
37
+
38
+ ```bash
39
+ pip install --upgrade setuptools wheel
40
+ ```
41
+
42
+ ### Build the Package
43
+
44
+ ```bash
45
+ pip install .
46
+ ```
47
+
48
+ ### Upload to PyPI
49
+
50
+ First, install twine:
51
+
52
+ ```bash
53
+ pip install twine
54
+ ```
55
+
56
+ ### Then upload your package (you'll need a PyPI account)
57
+
58
+ ```bash
59
+ twine upload dist/\*
60
+ ```
61
+
62
+ ### Install the Package Locally for Testing
63
+
64
+ You can install the package locally to test it before uploading:
65
+
66
+ ```bash
67
+ pip install -e .
68
+ ```
69
+
70
+ The -e flag installs the package in editable mode, which is useful during development.
71
+
72
+ ## Run Tests
73
+
74
+ ```bash
75
+ pip install pytest
76
+ pytest tests/
77
+ ```
78
+
79
+ ### Using the Package in Other Projects
80
+
81
+ Once your package is published to PyPI, other users can install it using:
82
+
83
+ ```bash
84
+ pip install dhisana
85
+ ```
86
+
87
+ They can then import your SDK as:
88
+
89
+ ```bash
90
+ from dhisana.utils.agent_tools import (
91
+ search_google_maps,
92
+ enrich_people_with_apollo,
93
+ search_google,
94
+ search_google_jobs,
95
+ search_google_news,
96
+ get_html_content_from_url,
97
+ parse_html_content,
98
+ extract_image_links,
99
+ extract_head_section_from_html_content,
100
+ get_email_if_exists,
101
+ search_crunchbase,
102
+ search_people_with_apollo,
103
+ search_companies_with_apollo,
104
+ enrich_company_with_apollo,
105
+ get_job_postings_from_apollo
106
+ )
107
+
108
+ # Use the functionalities provided by your SDK
109
+ ```
110
+
111
+ ### To use locally
112
+
113
+ ```bash
114
+ pip install -e /path/to/other/project
115
+ ```
116
+
117
+ ### To use CLI
118
+
119
+ You can use the CLI provided by the Dhisana AI SDK. To see the available commands and options, use:
120
+
121
+ ```bash
122
+ dhisana --help
123
+ ```
124
+
125
+ This will display:
126
+
127
+ ```bash
128
+ Usage: dhisana [OPTIONS] COMMAND [ARGS]...
129
+
130
+ Dhisana AI SDK CLI.
131
+
132
+ Options:
133
+ --help Show this message and exit.
134
+
135
+ Commands:
136
+ dataset-cli Commands for managing datasets.
137
+ model-cli Commands for managing models.
138
+ prediction-cli Commands for running predictions.
139
+ ```
@@ -0,0 +1,3 @@
1
+ [build-system]
2
+ requires = ["setuptools>=42", "wheel"]
3
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
dhisana-0.1.0/setup.py ADDED
@@ -0,0 +1,36 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name='dhisana',
5
+ version='0.1.0',
6
+ description='A Python SDK for Dhisana AI Platform',
7
+ author='Admin',
8
+ author_email='contact@dhisana.ai',
9
+ url='https://github.com/dhisana-ai/dhisana-python-sdk',
10
+ license='MIT',
11
+ packages=find_packages(where='src'),
12
+ package_dir={'': 'src'},
13
+ install_requires=[
14
+ 'bs4',
15
+ 'click>=7.0',
16
+ 'fastapi',
17
+ 'google-api-python-client',
18
+ 'google-auth',
19
+ 'openai',
20
+ 'playwright',
21
+ 'requests',
22
+ 'uvicorn[standard]',
23
+ ],
24
+ entry_points={
25
+ 'console_scripts': [
26
+ 'dhisana=dhisana.cli.cli:main',
27
+ ],
28
+ },
29
+ classifiers=[
30
+ 'Development Status :: 3 - Alpha',
31
+ 'Intended Audience :: Developers',
32
+ 'License :: OSI Approved :: MIT License',
33
+ 'Programming Language :: Python :: 3.8'
34
+ ],
35
+ python_requires='>=3.8',
36
+ )
@@ -0,0 +1 @@
1
+ __path__ = __import__('pkgutil').extend_path(__path__, __name__)
@@ -0,0 +1 @@
1
+ __path__ = __import__('pkgutil').extend_path(__path__, __name__)
@@ -0,0 +1,20 @@
1
+ import click
2
+ from .models import model_cli
3
+ from .datasets import dataset_cli
4
+ from .predictions import prediction_cli
5
+
6
+ @click.group()
7
+ def cli():
8
+ """Dhisana AI SDK CLI."""
9
+ pass
10
+
11
+ # Add command groups from the respective CLI files
12
+ cli.add_command(model_cli)
13
+ cli.add_command(dataset_cli)
14
+ cli.add_command(prediction_cli)
15
+
16
+ def main():
17
+ cli()
18
+
19
+ if __name__ == '__main__':
20
+ main()
@@ -0,0 +1,27 @@
1
+ import click
2
+
3
+ @click.group()
4
+ def dataset_cli():
5
+ """Commands for managing datasets."""
6
+ pass
7
+
8
+ @dataset_cli.command()
9
+ def list():
10
+ """List all datasets."""
11
+ # Example placeholder logic for listing datasets
12
+ click.echo("Datasets: dataset1, dataset2, dataset3")
13
+
14
+ @dataset_cli.command()
15
+ @click.argument('dataset_name')
16
+ @click.option('--file-path', required=True, help='Path to the dataset file')
17
+ def add(dataset_name, file_path):
18
+ """Add a new dataset."""
19
+ # Example placeholder logic for adding a dataset
20
+ click.echo(f"Dataset '{dataset_name}' has been added from '{file_path}'.")
21
+
22
+ @dataset_cli.command()
23
+ @click.argument('dataset_name')
24
+ def delete(dataset_name):
25
+ """Delete an existing dataset."""
26
+ # Example placeholder logic for deleting a dataset
27
+ click.echo(f"Dataset '{dataset_name}' has been deleted.")
@@ -0,0 +1,26 @@
1
+ import click
2
+
3
+ @click.group()
4
+ def model_cli():
5
+ """Commands for managing models."""
6
+ pass
7
+
8
+ @model_cli.command()
9
+ def list():
10
+ """List all available models."""
11
+ # Example placeholder logic for listing models
12
+ click.echo("Available models: model1, model2, model3")
13
+
14
+ @model_cli.command()
15
+ @click.argument('model_name')
16
+ def add(model_name):
17
+ """Add a new model."""
18
+ # Example placeholder logic for adding a model
19
+ click.echo(f"Model '{model_name}' has been added.")
20
+
21
+ @model_cli.command()
22
+ @click.argument('model_name')
23
+ def delete(model_name):
24
+ """Delete an existing model."""
25
+ # Example placeholder logic for deleting a model
26
+ click.echo(f"Model '{model_name}' has been deleted.")
@@ -0,0 +1,20 @@
1
+ import click
2
+
3
+ @click.group()
4
+ def prediction_cli():
5
+ """Commands for running predictions."""
6
+ pass
7
+
8
+ @prediction_cli.command()
9
+ @click.argument('model_name')
10
+ @click.argument('dataset_name')
11
+ def run(model_name, dataset_name):
12
+ """Run predictions using the specified model on the given dataset."""
13
+ # Example placeholder logic for running predictions
14
+ click.echo(f"Running predictions on '{dataset_name}' using model '{model_name}'.")
15
+
16
+ @prediction_cli.command()
17
+ def list():
18
+ """List all previous predictions."""
19
+ # Example placeholder logic for listing previous predictions
20
+ click.echo("Predictions: prediction1, prediction2")
@@ -0,0 +1 @@
1
+ __path__ = __import__('pkgutil').extend_path(__path__, __name__)