composio-gemini 1.0.0rc2__tar.gz → 1.0.0rc4__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.
@@ -0,0 +1,186 @@
1
+ ############################
2
+ ## Project Specific Items ##
3
+ ############################
4
+ try.ipynb
5
+ refactor_debug.ipynb
6
+ temp
7
+
8
+ .vscode
9
+ #############################################
10
+ ## From @Github/gitignore/Python.gitignore ##
11
+ #############################################
12
+ # Byte-compiled / optimized / DLL files
13
+ #
14
+ __pycache__/
15
+ *.py[cod]
16
+ *$py.class
17
+
18
+ # C extensions
19
+ *.so
20
+
21
+ # Distribution / packaging
22
+ .Python
23
+ build/
24
+ develop-eggs/
25
+ dist/
26
+ downloads/
27
+ eggs/
28
+ .eggs/
29
+ lib/
30
+ lib64/
31
+ parts/
32
+ sdist/
33
+ var/
34
+ wheels/
35
+ share/python-wheels/
36
+ *.egg-info/
37
+ .installed.cfg
38
+ *.egg
39
+ MANIFEST
40
+
41
+ # PyInstaller
42
+ # Usually these files are written by a python script from a template
43
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
44
+ *.manifest
45
+ *.spec
46
+
47
+ # Installer logs
48
+ pip-log.txt
49
+ pip-delete-this-directory.txt
50
+
51
+ # Unit test / coverage reports
52
+ htmlcov/
53
+ .tox/
54
+ .nox/
55
+ .coverage
56
+ .coverage.*
57
+ .cache
58
+ nosetests.xml
59
+ coverage.xml
60
+ *.cover
61
+ *.py,cover
62
+ .hypothesis/
63
+ .pytest_cache/
64
+ cover/
65
+
66
+ # Translations
67
+ *.mo
68
+ *.pot
69
+
70
+ # Django stuff:
71
+ *.log
72
+ local_settings.py
73
+ db.sqlite3
74
+ db.sqlite3-journal
75
+
76
+ # Flask stuff:
77
+ instance/
78
+ .webassets-cache
79
+
80
+ # Scrapy stuff:
81
+ .scrapy
82
+
83
+ # Sphinx documentation
84
+ docs/_build/
85
+
86
+ # PyBuilder
87
+ .pybuilder/
88
+ target/
89
+
90
+ # Jupyter Notebook
91
+ .ipynb_checkpoints
92
+
93
+ # IPython
94
+ profile_default/
95
+ ipython_config.py
96
+
97
+ # pyenv
98
+ # For a library or package, you might want to ignore these files since the code is
99
+ # intended to run in multiple environments; otherwise, check them in:
100
+ # .python-version
101
+
102
+ # pipenv
103
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
104
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
105
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
106
+ # install all needed dependencies.
107
+ Pipfile.lock
108
+
109
+ # UV
110
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
111
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
112
+ # commonly ignored for libraries.
113
+ #uv.lock
114
+
115
+ # poetry
116
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
117
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
118
+ # commonly ignored for libraries.
119
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
120
+ #poetry.lock
121
+
122
+ # pdm
123
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
124
+ #pdm.lock
125
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
126
+ # in version control.
127
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
128
+ .pdm.toml
129
+ .pdm-python
130
+ .pdm-build/
131
+
132
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
133
+ __pypackages__/
134
+
135
+ # Celery stuff
136
+ celerybeat-schedule
137
+ celerybeat.pid
138
+
139
+ # SageMath parsed files
140
+ *.sage.py
141
+
142
+ # Environments
143
+ .env
144
+ .venv
145
+ env/
146
+ venv/
147
+ ENV/
148
+ env.bak/
149
+ venv.bak/
150
+
151
+ # Spyder project settings
152
+ .spyderproject
153
+ .spyproject
154
+
155
+ # Rope project settings
156
+ .ropeproject
157
+
158
+ # mkdocs documentation
159
+ /site
160
+
161
+ # mypy
162
+ .mypy_cache/
163
+ .dmypy.json
164
+ dmypy.json
165
+
166
+ # Pyre type checker
167
+ .pyre/
168
+
169
+ # pytype static type analyzer
170
+ .pytype/
171
+
172
+ # Cython debug symbols
173
+ cython_debug/
174
+
175
+ # PyCharm
176
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
177
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
178
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
179
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
180
+ #.idea/
181
+
182
+ # Ruff stuff:
183
+ .ruff_cache/
184
+
185
+ # PyPI configuration file
186
+ .pypirc
@@ -1,25 +1,16 @@
1
1
  Metadata-Version: 2.4
2
- Name: composio_gemini
3
- Version: 1.0.0rc2
2
+ Name: composio-gemini
3
+ Version: 1.0.0rc4
4
4
  Summary: Use Composio to get an array of tools with your Gemini agent.
5
- Home-page: https://github.com/ComposioHQ/composio
6
- Author: Composio
7
- Author-email: tech@composio.dev
8
- Classifier: Programming Language :: Python :: 3
5
+ Project-URL: Homepage, https://github.com/ComposioHQ/composio
6
+ Author-email: Composio <tech@composio.dev>
9
7
  Classifier: License :: OSI Approved :: Apache Software License
10
8
  Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.9,<4
12
- Description-Content-Type: text/markdown
9
+ Classifier: Programming Language :: Python :: 3
10
+ Requires-Python: <4,>=3.9
11
+ Requires-Dist: composio
13
12
  Requires-Dist: google-genai
14
- Dynamic: author
15
- Dynamic: author-email
16
- Dynamic: classifier
17
- Dynamic: description
18
- Dynamic: description-content-type
19
- Dynamic: home-page
20
- Dynamic: requires-dist
21
- Dynamic: requires-python
22
- Dynamic: summary
13
+ Description-Content-Type: text/markdown
23
14
 
24
15
  ## 🚀🔗 Integrating Composio with Google's Gemini SDK
25
16
 
@@ -0,0 +1,27 @@
1
+ from composio import Composio
2
+ from composio_gemini import GeminiProvider
3
+
4
+ from google import genai
5
+ from google.genai import types
6
+
7
+
8
+ # Create composio client
9
+ composio = Composio(provider=GeminiProvider())
10
+
11
+ # Create google client
12
+ client = genai.Client()
13
+
14
+ # Create genai client config
15
+ config = types.GenerateContentConfig(
16
+ tools=composio.tools.get(
17
+ user_id="default",
18
+ tools=[
19
+ "GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER",
20
+ ],
21
+ )
22
+ )
23
+
24
+ # Use the chat interface.
25
+ chat = client.chats.create(model="gemini-2.0-flash", config=config)
26
+ response = chat.send_message("Can you star composiohq/composio repository on github")
27
+ print(response.text)
@@ -0,0 +1,25 @@
1
+ [project]
2
+ name = "composio-gemini"
3
+ version = "1.0.0-rc4"
4
+ description = "Use Composio to get an array of tools with your Gemini agent."
5
+ readme = "README.md"
6
+ requires-python = ">=3.9,<4"
7
+ authors = [
8
+ { name = "Composio", email = "tech@composio.dev" }
9
+ ]
10
+ classifiers = [
11
+ "Programming Language :: Python :: 3",
12
+ "License :: OSI Approved :: Apache Software License",
13
+ "Operating System :: OS Independent",
14
+ ]
15
+ dependencies = [
16
+ "google-genai",
17
+ "composio",
18
+ ]
19
+
20
+ [project.urls]
21
+ Homepage = "https://github.com/ComposioHQ/composio"
22
+
23
+ [build-system]
24
+ requires = ["hatchling"]
25
+ build-backend = "hatchling.build"
@@ -9,7 +9,7 @@ from setuptools import setup
9
9
 
10
10
  setup(
11
11
  name="composio_gemini",
12
- version="1.0.0-rc2",
12
+ version="1.0.0-rc4",
13
13
  author="Composio",
14
14
  author_email="tech@composio.dev",
15
15
  description="Use Composio to get an array of tools with your Gemini agent.",
@@ -1,95 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: composio_gemini
3
- Version: 1.0.0rc2
4
- Summary: Use Composio to get an array of tools with your Gemini agent.
5
- Home-page: https://github.com/ComposioHQ/composio
6
- Author: Composio
7
- Author-email: tech@composio.dev
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: Apache Software License
10
- Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.9,<4
12
- Description-Content-Type: text/markdown
13
- Requires-Dist: google-genai
14
- Dynamic: author
15
- Dynamic: author-email
16
- Dynamic: classifier
17
- Dynamic: description
18
- Dynamic: description-content-type
19
- Dynamic: home-page
20
- Dynamic: requires-dist
21
- Dynamic: requires-python
22
- Dynamic: summary
23
-
24
- ## 🚀🔗 Integrating Composio with Google's Gemini SDK
25
-
26
- Streamline the integration of Composio with Google AI Python to enhance the capabilities of Gemini models, allowing them to interact directly with external applications and expanding their operational scope.
27
-
28
- ### Objective
29
-
30
- - **Automate starring a GitHub repository** using conversational instructions via Google AI Python's Function Calling feature.
31
-
32
- ### Installation and Setup
33
-
34
- Ensure you have the necessary packages installed and connect your GitHub account to allow your agents to utilize GitHub functionalities.
35
-
36
- ```bash
37
- # Install Composio Gemini package
38
- pip install composio-gemini
39
-
40
- # Connect your GitHub account
41
- composio add github
42
-
43
- # View available applications you can connect with
44
- composio apps
45
- ```
46
-
47
- ### Usage Steps
48
-
49
- #### 1. Import Base Packages
50
-
51
- Prepare your environment by initializing necessary imports from Google AI Python and setting up your client.
52
-
53
- ```python
54
- from google import genai
55
-
56
- # Create google client
57
- client = genai.Client()
58
- ```
59
-
60
- ### Step 2: Integrating GitHub Tools with Composio
61
-
62
- This step involves fetching and integrating GitHub tools provided by Composio, enabling enhanced functionality for Google AI Python operations.
63
- ```python
64
- from google.genai import types
65
-
66
- from composio_gemini import Action, ComposioToolSet
67
-
68
- # Create composio client
69
- toolset = ComposioToolSet()
70
-
71
- # Create tools
72
- tools = toolset.get_tools(
73
- actions=[
74
- Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER,
75
- ]
76
- )
77
-
78
- # Create genai client config
79
- config = types.GenerateContentConfig(
80
- tools=tools, # type: ignore
81
- )
82
- ```
83
-
84
- ### Step 3: Agent Execution
85
-
86
- This step involves configuring and executing the agent to carry out actions, such as starring a GitHub repository.
87
-
88
- ```python
89
- # Use the chat interface.
90
- chat = client.chats.create(model="gemini-2.0-flash", config=config)
91
- response = chat.send_message(
92
- "Can you star composiohq/composio repository on github",
93
- )
94
- print(response.text)
95
- ```
@@ -1,9 +0,0 @@
1
- README.md
2
- setup.py
3
- composio_gemini/__init__.py
4
- composio_gemini/provider.py
5
- composio_gemini.egg-info/PKG-INFO
6
- composio_gemini.egg-info/SOURCES.txt
7
- composio_gemini.egg-info/dependency_links.txt
8
- composio_gemini.egg-info/requires.txt
9
- composio_gemini.egg-info/top_level.txt
@@ -1 +0,0 @@
1
- google-genai
@@ -1 +0,0 @@
1
- composio_gemini
@@ -1,4 +0,0 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-