Compare commits

..

57 Commits

Author SHA1 Message Date
41127aa9d3 add in more tests
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 10:14:25 -08:00
4bb7008d5d I HAVE GENERATED YOUR NEW DOCS! 2021-12-15 15:00:34 +00:00
d8a9721d18 update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:59:04 -08:00
5d237a4eda I HAVE GENERATED YOUR NEW DOCS! 2021-12-15 14:58:26 +00:00
30999f1cd3 update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:57:05 -08:00
fc6ea7af77 I HAVE GENERATED YOUR NEW DOCS! 2021-12-15 14:51:14 +00:00
0d0afa4497 update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:49:55 -08:00
a4d57836f5 I HAVE GENERATED YOUR NEW DOCS! 2021-12-15 14:45:22 +00:00
e9c5722b1d update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:43:50 -08:00
803c016174 I HAVE GENERATED YOUR NEW DOCS! 2021-12-15 14:37:04 +00:00
2a5c28f9a9 fix
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:35:32 -08:00
5afd7562d4 update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:32:40 -08:00
afcc5b88c1 run pytest
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:32:40 -08:00
bd072b07a3 update for pytest
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:32:39 -08:00
324e803f0e I HAVE GENERATED YOUR NEW DOCS! 2021-12-15 14:27:54 +00:00
a757aaa633 update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:26:21 -08:00
37b2635a01 I HAVE GENERATED YOUR NEW DOCS! 2021-12-15 14:23:17 +00:00
ab06822559 fix
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:23:12 -08:00
9678dabcb6 update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:21:45 -08:00
5a024a1949 fixc
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:21:11 -08:00
00a7f93a94 add docs
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:19:51 -08:00
9d3cf53570 I HAVE GENERATED YOUR NEW DOCS! 2021-12-15 14:17:23 +00:00
ccc30676ef cleanup
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:16:02 -08:00
5c01da0271 add the file
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:15:03 -08:00
a4cf10655f update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:15:03 -08:00
900d90fdb4 I HAVE GENERATED YOUR NEW DOCS! 2021-12-15 14:12:56 +00:00
2ca2b5f87b update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:11:05 -08:00
12c5b1ba49 update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 06:02:09 -08:00
134c904d90 I HAVE GENERATED YOUR NEW DOCS! 2021-12-15 11:56:44 +00:00
059dc0e521 update docs
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 03:54:54 -08:00
dfa76e9462 updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 03:54:54 -08:00
abf4ce8e52 clean the folder first
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 03:54:54 -08:00
2761fc47f6 Update README.md 2021-12-15 02:08:42 -08:00
f3d080d971 I HAVE GENERATED YOUR NEW DOCS! 2021-12-15 10:04:26 +00:00
00b5cd9288 update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 02:03:32 -08:00
5954a57a5d update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 02:00:30 -08:00
d40e7832a2 I HAVE GENERATED YOUR NEW DOCS! 2021-12-15 09:58:14 +00:00
eb33fd8c9c update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 01:57:39 -08:00
5e7fe2f663 fix
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 01:57:39 -08:00
a4a74c780a I HAVE GENERATED YOUR NEW DOCS! 2021-12-15 09:55:26 +00:00
2235d10966 update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 01:54:47 -08:00
cba4690d88 install
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 01:53:07 -08:00
ce8338cc3e update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 01:51:26 -08:00
800ce9ccdf try again
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 01:29:24 -08:00
2895434602 update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 01:27:44 -08:00
c3cd16858a update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 01:25:48 -08:00
b0c71ad0f5 cleanup
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 01:24:18 -08:00
7c964a3d05 generate the docs
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 01:23:59 -08:00
10b2aa4f2a add content
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 01:18:36 -08:00
ae1353ef82 Create dependabot.yml 2021-12-15 01:09:43 -08:00
613864cf42 update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 01:06:41 -08:00
3ee3ae9a6c move around files
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-15 01:05:44 -08:00
7ee7964440 update makefile
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-14 18:51:57 -08:00
789f0b2a3b fix the client
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-14 18:39:22 -08:00
62b021d566 bump the version
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-14 18:38:16 -08:00
27266e32ec update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2021-12-14 18:29:47 -08:00
7b445af622 Update README.md 2021-12-14 18:19:40 -08:00
361 changed files with 32755 additions and 97 deletions

11
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"

View File

@ -29,21 +29,35 @@ jobs:
shell: bash shell: bash
run: | run: |
pip install \ pip install \
flake8 \ poetry
poetry \
pytest
- name: Build - name: Build
shell: bash shell: bash
run: | run: |
cd kittycad poetry install
poetry build poetry build
- name: Lint with flake8 - name: Lint with flake8
shell: bash shell: bash
run: | run: |
# stop the build if there are Python syntax errors or undefined names # stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run pytest
shell: bash
run: |
poetry run pytest --cov=./ --cov-report=xml kittycad
env:
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
flags: unittests
files: ${{ github.workspace }}/coverage.xml
verbose: true

68
.github/workflows/generate-docs.yml vendored Normal file
View File

@ -0,0 +1,68 @@
name: generate docs
permissions:
contents: write
on:
push:
branches: main
paths:
- docs/conf.py
- '**.rst'
- '**.py'
- .github/workflows/generate-docs.yml
pull_request:
paths:
- docs/conf.py
- '**.rst'
- '**.py'
- .github/workflows/generate-docs.yml
jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
# Installation instructions are from: https://python-poetry.org/docs/
- name: Install dependencies
shell: bash
run: |
sudo apt update && sudo apt install -y \
enchant-2 \
--no-install-recommends
pip install \
poetry
- name: Build
shell: bash
run: |
poetry build
- name: Generate the docs
shell: bash
run: |
rm -rf docs/html
poetry install
poetry run sphinx-build -b html docs/ docs/html/
- name: Check for modified files
id: git-check
run: echo ::set-output name=modified::$(if git diff-index --ignore-submodules --quiet HEAD --; then echo "false"; else echo "true"; fi)
- name: Commit changes, if any
if: steps.git-check.outputs.modified == 'true'
run: |
git add .
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
git commit -am "I HAVE GENERATED YOUR NEW DOCS!" || true
git fetch origin
git rebase origin/${{github.ref_name }} || true
git push origin ${{github.ref_name }}

View File

@ -21,7 +21,6 @@ jobs:
- name: Do the release - name: Do the release
shell: bash shell: bash
run: | run: |
cd kittycad
poetry publish --build \ poetry publish --build \
--username ${{secrets.PYPI_USERNAME}} \ --username ${{secrets.PYPI_USERNAME}} \
--password ${{secrets.PYPI_SECRET}} --password ${{secrets.PYPI_SECRET}}

View File

@ -21,3 +21,5 @@ dmypy.json
/coverage.xml /coverage.xml
/.coverage /.coverage
poetry.lock

View File

@ -5,20 +5,28 @@ ifeq ($(INTERACTIVE), 1)
DOCKER_FLAGS += -t DOCKER_FLAGS += -t
endif endif
# For this to work, you need to install toml-cli: https://github.com/gnprice/toml-cli
# `cargo install toml-cli`
VERSION := $(shell toml get $(CURDIR)/pyproject.toml tool.poetry.version | jq -r .)
.PHONY: generate .PHONY: generate
generate: docker-image generate: docker-image
docker run --rm -i $(DOCKER_FLAGS) \ docker run --rm -i $(DOCKER_FLAGS) \
--name python-generator \ --name python-generator \
-v $(CURDIR):/usr/src \ -v $(CURDIR):/usr/kittycad \
--workdir /usr/src \ --workdir /usr \
$(DOCKER_IMAGE_NAME) openapi-python-client update \ $(DOCKER_IMAGE_NAME) openapi-python-client update \
--url https://api.kittycad.io \ --url https://api.kittycad.io \
--config /usr/src/config.yml --config /usr/kittycad/config.yml
.PHONY: docker-image .PHONY: docker-image
docker-image: docker-image:
docker build -t $(DOCKER_IMAGE_NAME) . docker build -t $(DOCKER_IMAGE_NAME) .
.PHONY: tag
tag: ## Create a new git tag to prepare to build a release.
git tag -sa "v$(VERSION)" -m "v$(VERSION)"
@echo "Run git push origin v$(VERSION) to push your new tag to GitHub and trigger a release."
.PHONY: help .PHONY: help
help: help:

View File

@ -5,6 +5,10 @@ The Python API client for KittyCAD.
This is generated from This is generated from
[openapi-generators/openapi-python-client](https://github.com/openapi-generators/openapi-python-client). [openapi-generators/openapi-python-client](https://github.com/openapi-generators/openapi-python-client).
- [PyPI](https://pypi.org/project/kittycad/)
- [Python docs](https://python.api.docs.kittycad.io/)
- [KittyCAD API Docs](https://docs.kittycad.io/?lang=python)
## Generating ## Generating
You can trigger a build with the GitHub action to generate the client. This will You can trigger a build with the GitHub action to generate the client. This will
@ -22,3 +26,44 @@ $ make generate
Please do not change the code directly since it is generated. PRs that change Please do not change the code directly since it is generated. PRs that change
the code directly will be automatically closed by a bot. the code directly will be automatically closed by a bot.
## Usage
First, create an authenticated client:
```python
from kittycad import AuthenticatedClient
client = AuthenticatedClient(token="your_token")
```
If you want to use the environment variable `KITTYCAD_API_TOKEN` to do
authentication and not pass one to the client, do the following:
```python
from kittycad import AuthenticatedClientFromEnv
client = AuthenticatedClientFromEnv()
```
Now call your endpoint and use your models:
```python
from kittycad.models import AuthSession
from kittycad.api.meta import meta_debug_session
from kittycad.types import Response
session: AuthSession = meta_debug_session.sync(client=client)
# or if you need more info (e.g. status_code)
response: Response[AuthSession] = meta_debug_session.sync_detailed(client=client)
```
Or do the same thing with an async version:
```python
from kittycad.models import AuthSession
from kittycad.api.meta import meta_debug_session
from kittycad.types import Response
session: AuthSession = await meta_debug_session.asyncio(client=client)
response: Response[AuthSession] = await meta_debug_session.asyncio_detailed(client=client)
```

BIN
assets/testing.stl Normal file

Binary file not shown.

View File

@ -0,0 +1,17 @@
AuthenticatedClient
===================
.. currentmodule:: kittycad
.. autoclass:: AuthenticatedClient
:show-inheritance:
.. rubric:: Methods Summary
.. autosummary::
~AuthenticatedClient.get_headers
.. rubric:: Methods Documentation
.. automethod:: get_headers

View File

@ -0,0 +1,27 @@
Client
======
.. currentmodule:: kittycad
.. autoclass:: Client
:show-inheritance:
.. rubric:: Methods Summary
.. autosummary::
~Client.get_cookies
~Client.get_headers
~Client.get_timeout
~Client.with_cookies
~Client.with_headers
~Client.with_timeout
.. rubric:: Methods Documentation
.. automethod:: get_cookies
.. automethod:: get_headers
.. automethod:: get_timeout
.. automethod:: with_cookies
.. automethod:: with_headers
.. automethod:: with_timeout

View File

@ -0,0 +1,6 @@
asyncio
=======
.. currentmodule:: kittycad.api.file.file_conversion_by_id
.. autofunction:: asyncio

View File

@ -0,0 +1,6 @@
asyncio_detailed
================
.. currentmodule:: kittycad.api.file.file_conversion_by_id
.. autofunction:: asyncio_detailed

View File

@ -0,0 +1,6 @@
sync
====
.. currentmodule:: kittycad.api.file.file_conversion_by_id
.. autofunction:: sync

View File

@ -0,0 +1,6 @@
sync_detailed
=============
.. currentmodule:: kittycad.api.file.file_conversion_by_id
.. autofunction:: sync_detailed

View File

@ -0,0 +1,6 @@
asyncio
=======
.. currentmodule:: kittycad.api.file.file_conversion_by_id_with_base64_helper
.. autofunction:: asyncio

View File

@ -0,0 +1,6 @@
sync
====
.. currentmodule:: kittycad.api.file.file_conversion_by_id_with_base64_helper
.. autofunction:: sync

View File

@ -0,0 +1,6 @@
asyncio
=======
.. currentmodule:: kittycad.api.file.file_convert
.. autofunction:: asyncio

View File

@ -0,0 +1,6 @@
asyncio_detailed
================
.. currentmodule:: kittycad.api.file.file_convert
.. autofunction:: asyncio_detailed

View File

@ -0,0 +1,6 @@
sync
====
.. currentmodule:: kittycad.api.file.file_convert
.. autofunction:: sync

View File

@ -0,0 +1,6 @@
sync_detailed
=============
.. currentmodule:: kittycad.api.file.file_convert
.. autofunction:: sync_detailed

View File

@ -0,0 +1,6 @@
asyncio
=======
.. currentmodule:: kittycad.api.file.file_convert_with_base64_helper
.. autofunction:: asyncio

View File

@ -0,0 +1,6 @@
sync
====
.. currentmodule:: kittycad.api.file.file_convert_with_base64_helper
.. autofunction:: sync

View File

@ -0,0 +1,6 @@
asyncio
=======
.. currentmodule:: kittycad.api.meta.meta_debug_instance
.. autofunction:: asyncio

View File

@ -0,0 +1,6 @@
asyncio_detailed
================
.. currentmodule:: kittycad.api.meta.meta_debug_instance
.. autofunction:: asyncio_detailed

View File

@ -0,0 +1,6 @@
sync
====
.. currentmodule:: kittycad.api.meta.meta_debug_instance
.. autofunction:: sync

View File

@ -0,0 +1,6 @@
sync_detailed
=============
.. currentmodule:: kittycad.api.meta.meta_debug_instance
.. autofunction:: sync_detailed

View File

@ -0,0 +1,6 @@
asyncio
=======
.. currentmodule:: kittycad.api.meta.meta_debug_session
.. autofunction:: asyncio

View File

@ -0,0 +1,6 @@
asyncio_detailed
================
.. currentmodule:: kittycad.api.meta.meta_debug_session
.. autofunction:: asyncio_detailed

View File

@ -0,0 +1,6 @@
sync
====
.. currentmodule:: kittycad.api.meta.meta_debug_session
.. autofunction:: sync

View File

@ -0,0 +1,6 @@
sync_detailed
=============
.. currentmodule:: kittycad.api.meta.meta_debug_session
.. autofunction:: sync_detailed

View File

@ -0,0 +1,6 @@
asyncio
=======
.. currentmodule:: kittycad.api.meta.ping
.. autofunction:: asyncio

View File

@ -0,0 +1,6 @@
asyncio_detailed
================
.. currentmodule:: kittycad.api.meta.ping
.. autofunction:: asyncio_detailed

View File

@ -0,0 +1,6 @@
sync
====
.. currentmodule:: kittycad.api.meta.ping
.. autofunction:: sync

View File

@ -0,0 +1,6 @@
sync_detailed
=============
.. currentmodule:: kittycad.api.meta.ping
.. autofunction:: sync_detailed

View File

@ -0,0 +1,17 @@
AuthenticatedClient
===================
.. currentmodule:: kittycad.client
.. autoclass:: AuthenticatedClient
:show-inheritance:
.. rubric:: Methods Summary
.. autosummary::
~AuthenticatedClient.get_headers
.. rubric:: Methods Documentation
.. automethod:: get_headers

View File

@ -0,0 +1,17 @@
AuthenticatedClientFromEnv
==========================
.. currentmodule:: kittycad.client
.. autoclass:: AuthenticatedClientFromEnv
:show-inheritance:
.. rubric:: Methods Summary
.. autosummary::
~AuthenticatedClientFromEnv.get_headers
.. rubric:: Methods Documentation
.. automethod:: get_headers

View File

@ -0,0 +1,27 @@
Client
======
.. currentmodule:: kittycad.client
.. autoclass:: Client
:show-inheritance:
.. rubric:: Methods Summary
.. autosummary::
~Client.get_cookies
~Client.get_headers
~Client.get_timeout
~Client.with_cookies
~Client.with_headers
~Client.with_timeout
.. rubric:: Methods Documentation
.. automethod:: get_cookies
.. automethod:: get_headers
.. automethod:: get_timeout
.. automethod:: with_cookies
.. automethod:: with_headers
.. automethod:: with_timeout

View File

@ -0,0 +1,29 @@
AuthSession
===========
.. currentmodule:: kittycad.models
.. autoclass:: AuthSession
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~AuthSession.additional_keys
.. rubric:: Methods Summary
.. autosummary::
~AuthSession.from_dict
~AuthSession.to_dict
.. rubric:: Attributes Documentation
.. autoattribute:: additional_keys
.. rubric:: Methods Documentation
.. automethod:: from_dict
.. automethod:: to_dict

View File

@ -0,0 +1,21 @@
Environment
===========
.. currentmodule:: kittycad.models
.. autoclass:: Environment
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~Environment.DEVELOPMENT
~Environment.PREVIEW
~Environment.PRODUCTION
.. rubric:: Attributes Documentation
.. autoattribute:: DEVELOPMENT
.. autoattribute:: PREVIEW
.. autoattribute:: PRODUCTION

View File

@ -0,0 +1,29 @@
ErrorMessage
============
.. currentmodule:: kittycad.models
.. autoclass:: ErrorMessage
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~ErrorMessage.additional_keys
.. rubric:: Methods Summary
.. autosummary::
~ErrorMessage.from_dict
~ErrorMessage.to_dict
.. rubric:: Attributes Documentation
.. autoattribute:: additional_keys
.. rubric:: Methods Documentation
.. automethod:: from_dict
.. automethod:: to_dict

View File

@ -0,0 +1,29 @@
FileConversion
==============
.. currentmodule:: kittycad.models
.. autoclass:: FileConversion
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~FileConversion.additional_keys
.. rubric:: Methods Summary
.. autosummary::
~FileConversion.from_dict
~FileConversion.to_dict
.. rubric:: Attributes Documentation
.. autoattribute:: additional_keys
.. rubric:: Methods Documentation
.. automethod:: from_dict
.. automethod:: to_dict

View File

@ -0,0 +1,25 @@
FileConversionStatus
====================
.. currentmodule:: kittycad.models
.. autoclass:: FileConversionStatus
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~FileConversionStatus.COMPLETED
~FileConversionStatus.FAILED
~FileConversionStatus.IN_PROGRESS
~FileConversionStatus.QUEUED
~FileConversionStatus.UPLOADED
.. rubric:: Attributes Documentation
.. autoattribute:: COMPLETED
.. autoattribute:: FAILED
.. autoattribute:: IN_PROGRESS
.. autoattribute:: QUEUED
.. autoattribute:: UPLOADED

View File

@ -0,0 +1,29 @@
InstanceMetadata
================
.. currentmodule:: kittycad.models
.. autoclass:: InstanceMetadata
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~InstanceMetadata.additional_keys
.. rubric:: Methods Summary
.. autosummary::
~InstanceMetadata.from_dict
~InstanceMetadata.to_dict
.. rubric:: Attributes Documentation
.. autoattribute:: additional_keys
.. rubric:: Methods Documentation
.. automethod:: from_dict
.. automethod:: to_dict

View File

@ -0,0 +1,29 @@
Message
=======
.. currentmodule:: kittycad.models
.. autoclass:: Message
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~Message.additional_keys
.. rubric:: Methods Summary
.. autosummary::
~Message.from_dict
~Message.to_dict
.. rubric:: Attributes Documentation
.. autoattribute:: additional_keys
.. rubric:: Methods Documentation
.. automethod:: from_dict
.. automethod:: to_dict

View File

@ -0,0 +1,25 @@
ValidFileTypes
==============
.. currentmodule:: kittycad.models
.. autoclass:: ValidFileTypes
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~ValidFileTypes.DWG
~ValidFileTypes.DXF
~ValidFileTypes.OBJ
~ValidFileTypes.STEP
~ValidFileTypes.STL
.. rubric:: Attributes Documentation
.. autoattribute:: DWG
.. autoattribute:: DXF
.. autoattribute:: OBJ
.. autoattribute:: STEP
.. autoattribute:: STL

View File

@ -0,0 +1,29 @@
AuthSession
===========
.. currentmodule:: kittycad.models.auth_session
.. autoclass:: AuthSession
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~AuthSession.additional_keys
.. rubric:: Methods Summary
.. autosummary::
~AuthSession.from_dict
~AuthSession.to_dict
.. rubric:: Attributes Documentation
.. autoattribute:: additional_keys
.. rubric:: Methods Documentation
.. automethod:: from_dict
.. automethod:: to_dict

View File

@ -0,0 +1,21 @@
Environment
===========
.. currentmodule:: kittycad.models.environment
.. autoclass:: Environment
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~Environment.DEVELOPMENT
~Environment.PREVIEW
~Environment.PRODUCTION
.. rubric:: Attributes Documentation
.. autoattribute:: DEVELOPMENT
.. autoattribute:: PREVIEW
.. autoattribute:: PRODUCTION

View File

@ -0,0 +1,29 @@
ErrorMessage
============
.. currentmodule:: kittycad.models.error_message
.. autoclass:: ErrorMessage
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~ErrorMessage.additional_keys
.. rubric:: Methods Summary
.. autosummary::
~ErrorMessage.from_dict
~ErrorMessage.to_dict
.. rubric:: Attributes Documentation
.. autoattribute:: additional_keys
.. rubric:: Methods Documentation
.. automethod:: from_dict
.. automethod:: to_dict

View File

@ -0,0 +1,29 @@
FileConversion
==============
.. currentmodule:: kittycad.models.file_conversion
.. autoclass:: FileConversion
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~FileConversion.additional_keys
.. rubric:: Methods Summary
.. autosummary::
~FileConversion.from_dict
~FileConversion.to_dict
.. rubric:: Attributes Documentation
.. autoattribute:: additional_keys
.. rubric:: Methods Documentation
.. automethod:: from_dict
.. automethod:: to_dict

View File

@ -0,0 +1,25 @@
FileConversionStatus
====================
.. currentmodule:: kittycad.models.file_conversion
.. autoclass:: FileConversionStatus
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~FileConversionStatus.COMPLETED
~FileConversionStatus.FAILED
~FileConversionStatus.IN_PROGRESS
~FileConversionStatus.QUEUED
~FileConversionStatus.UPLOADED
.. rubric:: Attributes Documentation
.. autoattribute:: COMPLETED
.. autoattribute:: FAILED
.. autoattribute:: IN_PROGRESS
.. autoattribute:: QUEUED
.. autoattribute:: UPLOADED

View File

@ -0,0 +1,25 @@
FileConversionStatus
====================
.. currentmodule:: kittycad.models.file_conversion_status
.. autoclass:: FileConversionStatus
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~FileConversionStatus.COMPLETED
~FileConversionStatus.FAILED
~FileConversionStatus.IN_PROGRESS
~FileConversionStatus.QUEUED
~FileConversionStatus.UPLOADED
.. rubric:: Attributes Documentation
.. autoattribute:: COMPLETED
.. autoattribute:: FAILED
.. autoattribute:: IN_PROGRESS
.. autoattribute:: QUEUED
.. autoattribute:: UPLOADED

View File

@ -0,0 +1,29 @@
InstanceMetadata
================
.. currentmodule:: kittycad.models.instance_metadata
.. autoclass:: InstanceMetadata
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~InstanceMetadata.additional_keys
.. rubric:: Methods Summary
.. autosummary::
~InstanceMetadata.from_dict
~InstanceMetadata.to_dict
.. rubric:: Attributes Documentation
.. autoattribute:: additional_keys
.. rubric:: Methods Documentation
.. automethod:: from_dict
.. automethod:: to_dict

View File

@ -0,0 +1,29 @@
Message
=======
.. currentmodule:: kittycad.models.message
.. autoclass:: Message
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~Message.additional_keys
.. rubric:: Methods Summary
.. autosummary::
~Message.from_dict
~Message.to_dict
.. rubric:: Attributes Documentation
.. autoattribute:: additional_keys
.. rubric:: Methods Documentation
.. automethod:: from_dict
.. automethod:: to_dict

View File

@ -0,0 +1,25 @@
ValidFileTypes
==============
.. currentmodule:: kittycad.models.valid_file_types
.. autoclass:: ValidFileTypes
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~ValidFileTypes.DWG
~ValidFileTypes.DXF
~ValidFileTypes.OBJ
~ValidFileTypes.STEP
~ValidFileTypes.STL
.. rubric:: Attributes Documentation
.. autoattribute:: DWG
.. autoattribute:: DXF
.. autoattribute:: OBJ
.. autoattribute:: STEP
.. autoattribute:: STL

View File

@ -0,0 +1,17 @@
File
====
.. currentmodule:: kittycad.types
.. autoclass:: File
:show-inheritance:
.. rubric:: Methods Summary
.. autosummary::
~File.to_tuple
.. rubric:: Methods Documentation
.. automethod:: to_tuple

View File

@ -0,0 +1,7 @@
Response
========
.. currentmodule:: kittycad.types
.. autoclass:: Response
:show-inheritance:

113
docs/conf.py Normal file
View File

@ -0,0 +1,113 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(1, os.path.dirname(os.path.abspath(__file__)))
sys.path.append(os.path.abspath('../kittycad'))
# -- Project information -----------------------------------------------------
project = 'kittycad'
author = 'KittyCAD Team Members'
copyright = author
# The full version, including alpha/beta/rc tags
# Get the version from the poetry file.
import toml
with open(os.path.abspath('../pyproject.toml'), 'r') as f:
parsed_toml = toml.load(f)
version = parsed_toml['tool']['poetry']['version']
version = 'v'+version
release = version
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx_autodoc_typehints',
'sphinx.ext.intersphinx',
'sphinx.ext.linkcode',
'sphinx_automodapi.automodapi',
'sphinx_rtd_theme'
]
numpydoc_show_class_members = False
automodapi_inheritance_diagram = False
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [
]
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = []
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'trac'
# Intersphinx configuration.
# FROM: https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#module-sphinx.ext.intersphinx
intersphinx_mapping = {
'python': ('https://python.readthedocs.io/en/latest/', None),
}
# This is a function linkcode_resolve(domain, info), which should return the URL
# to source code corresponding to the object in given domain with given information.
# FROM: https://www.sphinx-doc.org/en/master/usage/extensions/linkcode.html
def linkcode_resolve(domain, info):
if domain != 'py':
return None
if not info['module']:
return None
filename = info['module'].replace('.', '/')
return "https://github.com/kittycad/kittycad.py/%s.py" % filename
# Spell checker.
try:
import enchant # noqa # pylint: disable=unused-import
except ImportError as ex:
print("enchant module import failed:\n"
"{0}\n"
"Spell checking disabled.".format(ex),
file=sys.stderr)
else:
extensions.append('sphinxcontrib.spelling')
spelling_show_suggestions = True

4
docs/html/.buildinfo Normal file
View File

@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: e70151257d05c54cbec2f82169462e1b
tags: 645f666f9bcd5a90fca523b33c5a78b7

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More