Skip to content

Commit b401d07

Browse files
committed
add docs site
1 parent 7b642b6 commit b401d07

File tree

4 files changed

+160
-1
lines changed

4 files changed

+160
-1
lines changed

.github/docs.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build Docs
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- main
7+
permissions:
8+
contents: write
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Configure Git Credentials
15+
run: |
16+
git config user.name github-actions[bot]
17+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: 3.x
21+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
22+
- uses: actions/cache@v4
23+
with:
24+
key: mkdocs-material-${{ env.cache_id }}
25+
path: .cache
26+
restore-keys: |
27+
mkdocs-material-
28+
- run: pip install mkdocs-material
29+
- run: cp README.md docs/index.md
30+
- run: mkdocs gh-deploy --force

.pre-commit-config.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ repos:
77
hooks:
88
- id: trailing-whitespace
99
- id: end-of-file-fixer
10-
- id: check-yaml
1110
- id: check-added-large-files
1211

1312
- repo: https://github.com/PyCQA/isort

docs/index.md

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Home
2+
3+
A simple Python client for the [Lambda Cloud API](https://cloud.lambdalabs.com/api/v1/docs#overview--response-types-and-formats), built with [httpx](https://www.python-httpx.org/).
4+
5+
> [!NOTE]
6+
> This library is not an official Lambda Labs project
7+
8+
> [!NOTE]
9+
> This library is developed alongside GitHub Copilot and various AI models by OpenAI and Anthropic
10+
11+
## Installation
12+
13+
### Installation via PyPI
14+
15+
```bash
16+
pip install lambda-cloud-python
17+
```
18+
19+
### Installation from source
20+
21+
```bash
22+
git clone https://github.com/jxtngx/lambda-cloud-python.git
23+
cd lambda-cloud-python
24+
pip install -e .
25+
```
26+
27+
## Usage
28+
29+
> [!NOTE]
30+
> see [docs](./docs/) for more examples
31+
32+
The Lambda Cloud Python client provides the following functionality:
33+
34+
### Instances
35+
- `instances.list()` - Get all instances for the account
36+
- `instances.get(instance_id)` - Get details for a specific instance
37+
- `instances.update(instance_id, ...)` - Update details of a specific instance
38+
- `instances.launch(...)` - Launch one or more new instances
39+
- `instances.restart(instance_ids)` - Start one or more instances
40+
- `instances.terminate(instance_ids)` - Terminate one or more instances
41+
42+
### Instance Types
43+
- `instance_types.list()` - Get available instance types and their specifications
44+
45+
### SSH Keys
46+
- `ssh_keys.list()` - Get all SSH keys for the account
47+
- `ssh_keys.add(name, public_key)` - Add a new SSH key
48+
- `ssh_keys.delete(name)` - Delete an SSH key
49+
50+
### File Systems
51+
- `file_systems.list()` - Get all file systems for the account
52+
- `file_systems.create(...)` - Create a new file system
53+
- `file_systems.delete(name)` - Delete a file system
54+
55+
### Images
56+
- `images.list()` - List available machine images

mkdocs.yml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
site_name: Lambda Cloud Python
2+
site_author: Justin Goheen
3+
repo_url: https://github.com/jxtngx/lambda-cloud-python
4+
repo_name: Lambda Cloud Python
5+
6+
theme:
7+
name: material
8+
icon:
9+
repo: fontawesome/brands/github
10+
font:
11+
text: Roboto
12+
code: Roboto Mono
13+
features:
14+
- navigation.sections
15+
- navigation.path
16+
- navigation.top
17+
- content.code.copy
18+
palette:
19+
# Palette toggle for automatic mode
20+
- scheme: default
21+
primary: black
22+
toggle:
23+
icon: material/brightness-7
24+
name: Switch to dark mode
25+
- scheme: slate
26+
primary: black
27+
toggle:
28+
icon: material/brightness-4
29+
name: Switch to light mode
30+
31+
plugins:
32+
- search
33+
- mkdocstrings:
34+
default_handler: python
35+
handlers:
36+
python:
37+
paths: [src]
38+
options:
39+
docstring_style: google
40+
show_source: false
41+
line_length: 120
42+
43+
extra:
44+
social:
45+
- icon: fontawesome/brands/github
46+
link: https://github.com/jxtngx
47+
- icon: fontawesome/brands/linkedin
48+
link: https://www.linkedin.com/in/jxtngx/
49+
50+
markdown_extensions:
51+
- abbr
52+
- admonition
53+
- attr_list
54+
- def_list
55+
- footnotes
56+
- md_in_html
57+
- pymdownx.superfences:
58+
custom_fences:
59+
- name: mermaid
60+
class: mermaid
61+
format: !!python/name:pymdownx.superfences.fence_code_format
62+
63+
- pymdownx.highlight:
64+
anchor_linenums: true
65+
line_spans: __span
66+
pygments_lang_class: true
67+
- pymdownx.inlinehilite
68+
- pymdownx.snippets
69+
- pymdownx.superfences
70+
71+
extra_javascript:
72+
- javascripts/mathjax.js
73+
- https://polyfill.io/v3/polyfill.min.js?features=es6
74+
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

0 commit comments

Comments
 (0)