Skip to content

Commit

Permalink
Release v1.2: reorganised & remove python 3.5 support
Browse files Browse the repository at this point in the history
Signed-off-by: starry69 <starry369126@outlook.com>
  • Loading branch information
starry-shivam committed Sep 6, 2020
1 parent 363e31b commit 812c83d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![PyPI version](https://badge.fury.io/py/pymoviedb.svg)](https://badge.fury.io/py/pymoviedb)


## Install from PyPi
```pip install pymoviedb```

## Synopsis
```python
>>> from pymoviedb.pytmdb import Movie, TvShows
>>> from pymoviedb import Movie, TvShows
>>> APIKEY = "you-api-key"

# Create a Movie object
Expand Down Expand Up @@ -53,6 +55,9 @@ except ZeroResultsFound:
## See also
TMDB API docs: https://developers.themoviedb.org/3/

This library is being used by my telegram bot bot [αcutєвσt](https://t.me/acutebot),
Check that out to see live working example!

Remember that this module not support all TMDB API methods yet.
## License

Expand Down
9 changes: 9 additions & 0 deletions pymoviedb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,12 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
from .pytmdb import Movie, TvShows
from .excs import *

__author__ = ["Stɑrry Shivɑm"]
__version__ = 1.2

if __name__ == '__main__':
from pprint import pprint
pprint(__author__, __version__, Movie, TvShows)
6 changes: 3 additions & 3 deletions pymoviedb/excs.py → pymoviedb/excs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class TmdbApiError(ValueError):
class TmdbApiError(Exception):
"""
raised when API response is not `OK 200`
"""
Expand All @@ -7,11 +7,11 @@ def __init__(self, message):
super().__init__(message)


class ZeroResultsFound(ValueError):
class ZeroResultsFound(Exception):
"""
raise when zero results are found
against search query.
"""

def __init__(self, message):
super().__init__(message)
super().__init__(message)
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,17 @@
url='https://github.com/starry69/PyMovieDB',
author='Stɑrry Shivɑm',
author_email='starry369126@outlook.com',
version='1.1',
version='1.2',
license='MIT',
packages=find_packages(),
install_requires=['requests'],
python_requires='~=3.5',
python_requires='>=3.6',
keywords='api development tmdb themoviedb wrapper library python3',
classifiers=[
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Intended Audience :: Developers',
'Development Status :: 4 - Beta'
'Intended Audience :: Developers'
])

0 comments on commit 812c83d

Please sign in to comment.