You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
squarecloud-api is a wrapper of the [API] of [SquareCloud] made by [@alma]
8
10
9
11
## Installing
12
+
10
13
````
11
14
pip install squarecloud-api
12
15
````
13
16
14
17
## Starting
18
+
15
19
### Where to get my api key?
16
-
to get your api key/token just go to the [SquareCloud] website and register/login, after that go to `dashboard` > `my account` > `Regenerate API/CLI KEY` and copy the key.
20
+
21
+
to get your api key/token just go to the [SquareCloud] website and
22
+
register/login, after that go
23
+
to `dashboard` > `my account` > `Regenerate API/CLI KEY` and copy the key.
17
24
18
25
### The client instance
26
+
19
27
with the client you can get information about your application
for your convenience a function was added to create the configuration file
134
+
135
+
```python
136
+
import squarecloud as square
137
+
138
+
# application example
139
+
square.create_config_file(
140
+
path='directory/to/save/', # the path where the file should be saved
141
+
display_name='an cool name',
142
+
description='an cool description',
143
+
main='main.py',
144
+
memory=100,
145
+
version='recommended',
146
+
)
147
+
148
+
# website example
149
+
square.create_config_file(
150
+
path='directory/to/save',
151
+
display_name='cool website',
152
+
description='this is really cool',
153
+
main='index.js',
154
+
subdomain='coolwebsite.squareweb.app',
155
+
start='start this cool website', # if not static it is configurable
156
+
memory=512,
157
+
version='recommended',
158
+
)
159
+
160
+
"""
161
+
[REQUIRED] parameters
162
+
---------------------
163
+
path: str
164
+
display_name: str
165
+
main: str
166
+
memory: int
167
+
version: Literal['recommended', 'latest']
168
+
169
+
[OPTIONAL] parameters
170
+
---------------------
171
+
avatar: str | None = None
172
+
description: str | None = None
173
+
subdomain: str | None = None
174
+
start: str | None = None
175
+
"""
176
+
```
177
+
178
+
93
179
### Debug mode
94
-
Every time a request is made logs are displayed in the terminal containing useful informations, You can disable this by setting the `debug` parameter to False for the client, this value by default is True.
180
+
Every time a request is made logs are displayed in the terminal containing
181
+
useful information, You can disable this by setting the `debug` parameter to
182
+
False for the client, this value by default is True.
183
+
95
184
````py
96
185
import squarecloud as square
97
186
98
-
client = square.Client(api_key='API KEY', debug=False) # no logs
187
+
client = square.Client(api_key='API KEY', debug=False) # no logs
0 commit comments