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

Free Stuffs!

This is a python 3.x package which scrapes free stuff from Craigslist.
freestuffs is under the MIT license. Check out the `source code <https:"" polypmer="" freestuff-bot="">`_
and the `docs <http:"" en="" latest="">`_.

* Using StuffScraper one can gather a list of free stuffs.
* Using StuffCharter, one can create an HTML map of the free stuffs.

This library can be used to create a simple web application, such as the
`Treasure map <https:"" polypmer="" treasure-map="">`_, or a simple
`Twitter bot <https:"" polypmer="" freestuff-bot="">`_


Install using pip, requires python 3 and these dependences:

* requests
* geopy
* folium
* BeautifulSoup4
* unidecode


pip install freestuffs

Or, with virtualenvwrapper installed:

.. code-block:: bash

mkvirtualenv freestuffs
pip install freestuffs

Getting Started


The stuff class corresponds to a `Craiglist <https:"">`_
free stuff posting. It's basic characteristics include title and location.
Notably, there is no price attribute. If the posting has no image, the
`Wikipedia <https:"">`_ no-image image is used in it's place.


>>> from freestuffs.stuff_scraper import StuffScraper
>>> stuffs = StuffScraper('montreal', 5).stuffs
>>> print(stuffs[0])
what: free shelves
where: Workman St, montreal

Scape Stuffs

The StuffScraper class will scrape Craiglist for
free stuff.


>>> from freestuffs.stuff_scraper import StuffScraper
>>> stuffs = StuffScraper('montreal', 5).stuffs # precise=False
>>> print(stuffs[0].thing) # Title
Meubles / furniture

In order for the scraper to automatically
scrape for latitude and longitude coordinates, pass in the
parameter precise=True into the constructor.


>>> from freestuffs.stuff_scraper import StuffScraper
>>> stuffs = StuffScraper('montreal', 5, precise=True).stuffs
>>> print(stuffs[0].coordinates)
['45.617854', '-73.633931']

Chart Stuffs

The StuffCharter class will produce a folium Map object populated
with free stuff from the StuffScraper.


>>> from freestuffs.stuff_scraper import StuffScraper
>>> from freestuffs.stuff_charter import StuffCharter
>>> stuffs = StuffScraper('montreal', 5, precise=True).stuffs
>>> stuffs_chart = StuffCharter(stuffs)
call save_map(path) generate html map
>>> type(map.treasure_map)
<class ''="">

The StuffCharter object is a wrapper around the folium.Map.
Call :code:`save_map(HTML_PATH, CSS_PATH)`


>>> stuffs_chart.save_map('webmap', 'static/style.css')

This function creates a directory if it is not found in the path. Call instead
:code:`save_test_map()` to generate an HTML map in the current directory.

Chart Legend

Diminishing Order

- The smaller the posting, the older it is.
- The darker the border, the higher the amount of overlap.


The triage checks for regex search in this order:

#. Red are furniture "(wood|shelf|shelves|table|chair|scrap|desk)".
#. Blue are electronics "(tv|sony|écran|speakers|wire|electronic|saw|headphones|arduino)".
#. Black are the "desired" stuffs "(book|games|cool|guide|box)".
#. White is default (no regex search matches).


The easiest way to get support is to open an issue on Github_.

.. _Github:
Release History

Release History


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

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
freestuffs-0.1-py3-none-any.whl (19.6 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Jun 12, 2016
freestuffs-0.1.tar.gz (17.5 kB) Copy SHA256 Checksum SHA256 Source Jun 12, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS 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