Commit 1bafc985 by William Tisäter

Remove Epydoc strings

parent fc3dd163
# -*- coding: utf-8 -*-
"""
Pure Python GeoIP API
@author: Jennifer Ennis <zaylea@gmail.com>
@author: William Tisäter <william@defunct.cc>
@license: Copyright(C) 2004 MaxMind LLC
Copyright (c) 2010-2014 Jennifer Ennis, William Tisäter.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
......@@ -20,6 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/lgpl.txt>.
"""
__version__ = "0.3.1"
import os
......@@ -576,7 +572,7 @@ class GeoIP(object):
def time_zone_by_addr(self, addr):
"""
Returns timezone in tzdata format (e.g. America/New_York or Europe/Paris)
Returns time zone in tzdata format (e.g. America/New_York or Europe/Paris)
:arg addr: IP address (e.g. 203.0.113.30)
"""
......@@ -589,7 +585,7 @@ class GeoIP(object):
def time_zone_by_name(self, hostname):
"""
Returns timezone in tzdata format (e.g. America/New_York or Europe/Paris)
Returns time zone in tzdata format (e.g. America/New_York or Europe/Paris)
:arg hostname: Hostname (e.g. example.com)
"""
......
# -*- coding: utf-8 -*-
"""
Constants for the database parser
@author: Jennifer Ennis <zaylea@gmail.com>
@author: William Tisäter <william@defunct.cc>
@license: Copyright(C) 2004 MaxMind LLC
Copyright (c) 2010-2014 Jennifer Ennis, William Tisäter.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
......
# -*- coding: utf-8 -*-
"""
Time zone data and lookup function
@author: Jennifer Ennis <zaylea@gmail.com>
@author: William Tisäter <william@defunct.cc>
@license: Copyright(C) 2004 MaxMind LLC
Copyright (c) 2010-2014 Jennifer Ennis, William Tisäter.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
......@@ -21,17 +16,12 @@ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/lgpl.txt>.
"""
def time_zone_by_country_and_region(country_code, region_code=None):
"""
Get time zone from country code and region code.
Returns time zone from country and region code.
@param country_code: Country code
@type country_code: str
@param region_code: Region code
@type region_code: str
@return: Time zone
@rtype: str
:arg country_code: Country code
:arg region_code: Region code
"""
timezone = country_dict.get(country_code)
if not timezone:
......
# -*- coding: utf-8 -*-
"""
Utility function for address translation
@author: Jennifer Ennis <zaylea@gmail.com>
@author: William Tisäter <william@defunct.cc>
@license: Copyright(C) 2004 MaxMind LLC
Copyright (c) 2010-2014 Jennifer Ennis, William Tisäter.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
......@@ -34,9 +29,9 @@ from pygeoip import const
def ip2long(ip):
"""
Wrapper function for IPv4 and IPv6 converters
@param ip: IPv4 or IPv6 address
@type ip: str
Wrapper function for IPv4 and IPv6 converters.
:arg ip: IPv4 or IPv6 address
"""
try:
return int(binascii.hexlify(socket.inet_aton(ip)), 16)
......@@ -46,11 +41,8 @@ def ip2long(ip):
def str2fp(data):
"""
Convert bytes data to file handle object
Convert bytes data to file handle object (StringIO or BytesIO).
@param data: string data
@type data: str
@return: file handle object
@rtype: StringIO or BytesIO
:arg data: String data to transform
"""
return BytesIO(bytearray(data, const.ENCODING)) if const.PY3 else StringIO(data)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup file for pygeoip package.
@author: Jennifer Ennis <zaylea at gmail dot com>
@license:
Copyright(C) 2004 MaxMind LLC
Copyright (c) 2010-2014 Jennifer Ennis, William Tisäter.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment