bennylope/pygeocodio

Broken __init__.py and client.py in pip package manager

georgezoto opened this issue · 2 comments

Hello there,

It looks like this commit did not make it to the pip package manager. geocodio/init.py is still using the outdated format and client.py is still using version 1 of the Geocodio API:
9631d11

I am more than happy to do any testing,
George

bash-3.2$ pip install geocodio
Collecting geocodio
Requirement already satisfied: Requests>=2.2.0 in ./anaconda/lib/python3.6/site-packages (from geocodio)
Requirement already satisfied: idna<2.7,>=2.5 in ./anaconda/lib/python3.6/site-packages (from Requests>=2.2.0->geocodio)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./anaconda/lib/python3.6/site-packages (from Requests>=2.2.0->geocodio)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in ./anaconda/lib/python3.6/site-packages (from Requests>=2.2.0->geocodio)
Requirement already satisfied: certifi>=2017.4.17 in ./anaconda/lib/python3.6/site-packages (from Requests>=2.2.0->geocodio)
Installing collected packages: geocodio
Successfully installed geocodio-1.0.1

bash-3.2$ python3.6
Python 3.6.1 |Anaconda 4.4.0 (x86_64)| (default, May 11 2017, 13:04:09)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

from geocodio import GeocodioClient
Traceback (most recent call last):
File "", line 1, in
File "anaconda/lib/python3.6/site-packages/geocodio/init.py", line 8, in
from client import Client
ModuleNotFoundError: No module named 'client'

exit()

cat anaconda/lib/python3.6/site-packages/geocodio/init.py

!/usr/bin/env python
-*- coding: utf-8 -*-

__author__ = 'David Stanley'
__email__ = 'davidstanley01@gmail.com'
__version__ = '1.0.0'

from client import Client

__all__ = [Client]

bash-3.2$ head anaconda/lib/python3.6/site-packages/geocodio/client.py

import requests, json

class Client:
    url = 'http://api.geocod.io/v1'
    api_key = ''

    def __init__(self, api_key):
        """ Initialize the class, setting the api_key to the class property """
        self.api_key = api_key

Hi! Small problem here:

pip install geocodio

This is the pygeocodio package. I don't maintain the geocodio package. That's different and unmaintained.

My mistake, thank you for the clarification. I am using pygeocodio and I can now see the missing congressional and state legislation data with version 1.2.