Metadata-Version: 1.1
Name: mwtypes
Version: 0.1.3
Summary: A set of types for processing MediaWiki data.
Home-page: https://github.com/halfak/mwtypes
Author: Aaron Halfaker
Author-email: aaron.halfaker@gmail.com
License: The MIT License (MIT)

Copyright (c) 2015 Aaron Halfaker

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.

Description: # MediaWiki Types
        
        This library provides a set of classes for working with MediaWiki data types.  
        The point of this library is to help standardize different schemes and naming
        patterns between the database, XML dumps and API responses.  
        
        * **Installation:** ``pip install mwtypes``
        
        ## Types
        
        * Contributor -- An 'id' and 'user_text' of a user
        * Deleted -- The deleted/suppressed status of a revision or event
        * Namespace -- Namespace ID and metadata ('aliases', 'canonical', 'content')
        * Page -- Metadata about a page ('id', 'title', 'namespace', 'restrictions', etc.)
        * Revision -- Metadata about a revision ('id', 'contributor', 'timestamp', etc.)
        * Timestamp -- Basic operations and formatting of MediaWiki timestamp formats
        
        ## Timestamp example
        
            >>> import datetime, time
            >>> from mwtypes import Timestamp
            >>> Timestamp(1234567890)
            Timestamp('2009-02-13T23:31:30Z')
            >>> Timestamp(1234567890) == Timestamp("2009-02-13T23:31:30Z")
            True
            >>> Timestamp(1234567890) == Timestamp("20090213233130")
            True
            >>> Timestamp(1234567890) == Timestamp(datetime.datetime.utcfromtimestamp(1234567890))
            True
            >>> Timestamp(1234567890) == Timestamp(time.strptime("2009-02-13T23:31:30Z", "%Y-%m-%dT%H:%M:%SZ"))
            True
            >>> Timestamp(1234567890) == Timestamp(Timestamp(1234567890))
            True
        
        You can also do math and comparisons of timestamps.::
        
            >>> from mwtypes import Timestamp
            >>> t = Timestamp(1234567890)
            >>> t
            Timestamp('2009-02-13T23:31:30Z')
            >>> t2 = t + 10
            >>> t2
            Timestamp('2009-02-13T23:31:40Z')
            >>> t += 1
            >>> t
            Timestamp('2009-02-13T23:31:31Z')
            >>> t2 - t
            9
            >>> t < t2
            True
        
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Environment :: Other Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: General
Classifier: Topic :: Utilities
Classifier: Topic :: Scientific/Engineering
