This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
===============================
swapi-python
===============================

.. image:: https://badge.fury.io/py/swapi.png
:target: http://badge.fury.io/py/swapi

.. image:: https://travis-ci.org/phalt/swapi-python.png?branch=master
:target: https://travis-ci.org/phalt/swapi-python

.. image:: https://pypip.in/d/swapi/badge.png
:target: https://pypi.python.org/pypi/swapi


A Python helper library for swapi.co - the Star Wars API

* Free software: BSD license
* Documentation: https://swapi-python.readthedocs.org.

============
Installation
============

At the command line::

$ pip install swapi

Basic Usage
========

To use swapi-python in a project::

import swapi

All resources are accessible through the top-level ``get_resource()`` methods::

luke = swapi.get_person(1)
tatooine = swapi.get_planet(1)

Methods
=======

These are the top-level methods you can use to get resources from swapi.co. To learn more about the models and objects that are returned, see the ``models`` page.

get_person(id)
------------

Return a single ``Person`` resource.

Example::

swapi.get_person(1)
>>> <person -="" luke="" skywalker="">


get_planet(id)
------------

Return a single ``Planet`` resource.

Example::

swapi.get_planet(1)
>>> <planet -="" tatooine="">


get_starship(id)
------------

Return a single ``Starship`` resource.

Example::

swapi.get_starship(6)
>>> <starship -="" death="" star="">


get_vehicle(id)
------------

Return a single ``Vehicle`` resource.

Example::

swapi.get_vehicle(4)
>>> <vehicle -="" sand="" crawler="">


get_film(id)
------------

Return a single ``Film`` resource.

Example::

swapi.get_film(1)
>>> <film -="" a="" new="" hope="">


get_all("resource")
------------

Return a ``QuerySet`` containing all the items in a single resource. See the ```models``` page for more information on the models used in swapi-python.

Example::

swapi.get_all("films")
>>> <filmqueryset -="" 6="">




History
-------

0.1.0 (2014-12-21)
---------------------

* First release on PyPI.


0.1.2 (2014-12-22)
------------------

* Python 3.3 and Python 3.4 compatability


0.1.3 (2014-12-22)
-------------------

* Add "swapi-python" to User-Agent to help with analytics
Release History

Release History

0.1.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
swapi-0.1.3-py2.py3-none-any.whl (7.2 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Dec 22, 2014
swapi-0.1.3.tar.gz (15.7 kB) Copy SHA256 Checksum SHA256 Source Dec 22, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting