Commit 1bafc985 by William Tisäter

Remove Epydoc strings

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