Skip to content

Commit

Permalink
Add character endpoints (#51)
Browse files Browse the repository at this point in the history
* Updated dependencies, Updated README

* Revert "Updated dependencies, Updated README"

This reverts commit 1ed8b0a.

* Rollback yaml formatting

* Typo Fixes, Add Character endpoints

* Update Documentation

* Add Character Module to docs

* Update to better match python conventions

Renamed source project from Simyan to simyan, Moved similar modules to package, Changed docstrings to follow Google Style, Added/Updated docstrings, Added support for py3.10, many other minor tweaks

* Rename docs files

* Update documentation version

* Fix Github Actions with py3.10

* Update poetry

* Fix RTD example spacing

* Revert package changes

Move everything back under simyan

* Update dependencies, fix coverage package

Revert badge styles, added Flake8 badge
  • Loading branch information
Buried-In-Code authored Oct 12, 2021
1 parent c75b609 commit 76ed857
Show file tree
Hide file tree
Showing 50 changed files with 2,027 additions and 1,340 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ tab_width = 2

[{*.har,*.json}]
indent_size = 2
tab_width = 2

[{*.markdown,*.md}]
indent_style = space
Expand All @@ -24,3 +25,4 @@ indent_style = space

[{*.yaml,*.yml}]
indent_size = 2
tab_width = 2
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
max-line-length = 120
max-complexity = 18
select = B,C,D,E,F,W,T4,B9
extend-ignore = E203
extend-ignore = E203,D107
4 changes: 2 additions & 2 deletions .github/workflows/publishing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
python-version:
- 3.9
- '3.10'
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.1.8
version: 1.1.11
virtualenvs-create: true
virtualenvs-in-project: true
#----------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- 3.7
- 3.8
- 3.9
- '3.10'
os:
- ubuntu-latest
- macos-latest
Expand All @@ -39,7 +40,7 @@ jobs:
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.1.8
version: 1.1.11
virtualenvs-create: true
virtualenvs-in-project: true
#----------------------------------------------
Expand Down
17 changes: 9 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
repos:
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.0
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings, flake8-rst-docstrings]
- id: pyupgrade
args: [ "--py3-plus", "--py36-plus", "--py37-plus" ]
- repo: https://github.com/ambv/black
rev: 21.9b0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies: [ flake8-docstrings, flake8-builtins, flake8-rst-docstrings ]
- repo: https://github.com/pycqa/isort
rev: 5.9.3
hooks:
- id: isort
- repo: https://github.com/asottile/pyupgrade
rev: v2.27.0
hooks:
- id: pyupgrade
- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
Expand Down
38 changes: 18 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Simyan

[![PyPI - Python](https://img.shields.io/pypi/pyversions/Simyan.svg?logo=PyPI&label=Python-Versions&style=flat-square)](https://pypi.python.org/pypi/Simyan/)
[![PyPI - Python](https://img.shields.io/pypi/pyversions/Simyan.svg?logo=PyPI&label=Python&style=flat-square)](https://pypi.python.org/pypi/Simyan/)
[![PyPI - Status](https://img.shields.io/pypi/status/Simyan.svg?logo=PyPI&label=Status&style=flat-square)](https://pypi.python.org/pypi/Simyan/)
[![PyPI - Version](https://img.shields.io/pypi/v/Simyan.svg?logo=PyPI&label=Version&style=flat-square)](https://pypi.python.org/pypi/Simyan/)
[![PyPI - License](https://img.shields.io/pypi/l/Simyan.svg?logo=PyPI&label=License&style=flat-square)](https://opensource.org/licenses/GPL-3.0)

[![Github - Contributors](https://img.shields.io/github/contributors/Buried-In-Code/Simyan.svg?logo=Github&label=Contributors&style=flat-square)](https://github.com/Buried-In-Code/Simyan/graphs/contributors)

[![Github Action - Code Analysis](https://img.shields.io/github/workflow/status/Buried-In-Code/Simyan/Code-Analysis?logo=Github-Actions&label=Code-Analysis&style=flat-square)](https://github.com/Buried-In-Code/Simyan/actions/workflows/code-analysis.yaml)
[![Github Action - Testing](https://img.shields.io/github/workflow/status/Buried-In-Code/Simyan/Testing?logo=Github-Actions&label=Tests&style=flat-square)](https://github.com/Buried-In-Code/Simyan/actions/workflows/testing.yaml)

[![Read the Docs](https://img.shields.io/readthedocs/simyan?label=Read-the-Docs&logo=Read-the-Docs&style=flat-square)](https://simyan.readthedocs.io/en/latest/?badge=latest)

[![Code Style - Black](https://img.shields.io/badge/Code--Style-Black-000000.svg?style=flat-square)](https://github.com/psf/black)
[![Code Style - Flake8](https://img.shields.io/badge/Code--Style-Flake8-informational.svg?style=flat-square)](https://github.com/PyCQA/flake8)

A [Python](https://www.python.org/) wrapper for the [Comicvine](https://comicvine.gamespot.com/api/) API.

Expand All @@ -19,20 +22,19 @@ A [Python](https://www.python.org/) wrapper for the [Comicvine](https://comicvin
### PyPI

```bash
$ pip3 install -U --user Simyan
$ pip3 install -U --user simyan
```

## Example Usage

```python
from Simyan import api
# Your config/secrets
from config import comicvine_api_key
from simyan import create_session
from simyan.sqlite_cache import SQLiteCache

session = api(api_key=comicvine_api_key)
session = create_session(api_key="ComicVine API Key", cache=SQLiteCache())

# Search for Publisher
results = session.publisher_list(params={'filter': 'name:DC Comics'})
results = session.publisher_list(params={"filter": "name:DC Comics"})
for publisher in results:
print(f"{publisher.id} | {publisher.name} - {publisher.site_url}")

Expand All @@ -41,23 +43,19 @@ result = session.volume(_id=26266)
print(result.summary)
```

*There is a cache option to limit required calls to API*
## Depreciation

```python
from Simyan import api, SqliteCache
# Your config/secrets
from config import comicvine_api_key
This library is in Beta, changes will happen as the library settles.

session = api(api_key=comicvine_api_key, cache=SqliteCache())

# Get details for an Issue
result = session.issue(_id=189810)
print(f"{result.volume.name} #{result.number}")
print(result.description)
```
The following is the methodology when changing public Methods, Fields and Classes:
- Fields will be updated/removed in next minor release.
- Methods will be marked as deprecated and updated/removed in next major release.
- Classes will be marked as deprecated and updated/removed in next major release.

## Socials

Big thanks to [Mokkari](https://github.com/bpepple/mokkari) for the inspiration and template for this project.

[![Social - Discord](https://img.shields.io/discord/618581423070117932.svg?logo=Discord&label=The-DEV-Environment&style=flat-square&colorB=7289da)](https://discord.gg/nqGMeGg)
[![Social - Discord](https://img.shields.io/discord/618581423070117932.svg?logo=Discord&label=The-DEV-Environment&style=flat-square&colorB=7289da)](https://discord.gg/nqGMeGg)
![Social - Email](https://img.shields.io/badge/Email-BuriedInCode@tuta.io-red?style=flat-square&logo=Tutanota&logoColor=red)
[![Social - Twitter](https://img.shields.io/badge/Twitter-@BuriedInCode-blue?style=flat-square&logo=Twitter)](https://twitter.com/BuriedInCode)
20 changes: 0 additions & 20 deletions Simyan/__init__.py

This file was deleted.

86 changes: 0 additions & 86 deletions Simyan/creator.py

This file was deleted.

97 changes: 0 additions & 97 deletions Simyan/creator_list.py

This file was deleted.

Loading

0 comments on commit 76ed857

Please sign in to comment.