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

A Python library for Twingly’s Search API (previously known as Analytics API). Twingly is a blog search service that provides a searchable API known as Twingly Search API.

Installation

Install via PyPI

pip install twingly-search

Or add twingly-search to your application’s requirements file and then run

pip install -r requirements.txt

Or from source code

git clone https://github.com/twingly/twingly-search-api-python.git
cd twingly-search-api-python
python setup.py install

Usage

from twingly_search import Client

client = Client()

query = client.query()
query.pattern = 'github page-size:10'
query.language = 'sv'

# Assumes UTC if no timezone is specified
query.start_time = datetime.datetime(2015, 2, 23, 15, 18, 13)

result = query.execute()

for post in result.posts:
    print post.url

Example code can be found in examples/.

The twingly_search library talks to a commercial blog search API and requires an API key. Best practice is to set the TWINGLY_SEARCH_KEY environment variable to the obtained key. twingly_search.Client can be passed a key at initialization if your setup does not allow environment variables.

To learn more about the capabilities of the API, please read the Twingly Search API documentation.

Documentation

twingly_search is documented with pydoc. To read the documentation directly in your console you can run

pydoc twingly_search

or you can start a local pydoc web server with

pydoc -p 1234 twingly_search

In this case documentation will be available at http://localhost:1234/twingly_search.html

Requirements

Development

Tests

Install the tests dependencies

make deps

Run the tests

make test

Release

To be able to publish the package, create a .pypirc file containing your pypi username an password.

You will need pandoc to convert README.md to reStructuredText:

brew install pandoc
pip install pypandoc

Bump the version in setup.py and _*init_*.py.

Publish to PyPi:

./publish-to-pypi.sh

License

The MIT License (MIT)

Copyright (c) 2016 Twingly AB

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 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.

Release History

Release History

1.2.1

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

1.2.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

1.0.3

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
twingly_search-1.2.1-py2-none-any.whl (11.9 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Jun 21, 2016
twingly-search-1.2.1.tar.gz (8.5 kB) Copy SHA256 Checksum SHA256 Source Jun 21, 2016

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