Esempio n. 1
0
File: api.py Progetto: Aisling0/CPIP
def factory(type):
    ''' Returns an :class:`.ArrowFactory` for the specified :class:`Arrow <arrow.arrow.Arrow>`
    or derived type.

    :param type: the type, :class:`Arrow <arrow.arrow.Arrow>` or derived.

    '''

    return ArrowFactory(type)
Esempio n. 2
0
def factory(type: Type[Arrow]) -> ArrowFactory:
    """Returns an :class:`.ArrowFactory` for the specified :class:`Arrow <arrow.arrow.Arrow>`
    or derived type.

    :param type: the type, :class:`Arrow <arrow.arrow.Arrow>` or derived.

    """

    return ArrowFactory(type)
Esempio n. 3
0
File: api.py Progetto: Aisling0/CPIP
# -*- coding: utf-8 -*-
'''
Provides the default implementation of :class:`ArrowFactory <arrow.factory.ArrowFactory>`
methods for use as a module API.

'''

from __future__ import absolute_import

from arrow.factory import ArrowFactory

# internal default factory.
_factory = ArrowFactory()


def get(*args, **kwargs):
    ''' Implements the default :class:`ArrowFactory <arrow.factory.ArrowFactory>`
    ``get`` method.

    '''

    return _factory.get(*args, **kwargs)


def utcnow():
    ''' Implements the default :class:`ArrowFactory <arrow.factory.ArrowFactory>`
    ``utcnow`` method.

    '''

    return _factory.utcnow()