Debian Codegraph @

third_party/python/arrow/arrow-1.3.0.dist-info/METADATA

raw
1 Metadata-Version: 2.1
2 Name: arrow
3 Version: 1.3.0
4 Summary: Better dates & times for Python
5 Keywords: arrow,date,time,datetime,timestamp,timezone,humanize
6 Author-email: Chris Smith <[email protected]>
7 Requires-Python: >=3.8
8 Description-Content-Type: text/x-rst
9 Classifier: Development Status :: 5 - Production/Stable
10 Classifier: Intended Audience :: Developers
11 Classifier: Intended Audience :: Information Technology
12 Classifier: License :: OSI Approved :: Apache Software License
13 Classifier: Topic :: Software Development :: Libraries :: Python Modules
14 Classifier: Programming Language :: Python :: 3
15 Classifier: Programming Language :: Python :: 3 :: Only
16 Classifier: Programming Language :: Python :: 3.8
17 Classifier: Programming Language :: Python :: 3.9
18 Classifier: Programming Language :: Python :: 3.10
19 Classifier: Programming Language :: Python :: 3.11
20 Classifier: Programming Language :: Python :: 3.12
21 Classifier: Operating System :: OS Independent
22 Requires-Dist: python-dateutil>=2.7.0
23 Requires-Dist: types-python-dateutil>=2.8.10
24 Requires-Dist: doc8 ; extra == "doc"
25 Requires-Dist: sphinx>=7.0.0 ; extra == "doc"
26 Requires-Dist: sphinx-autobuild ; extra == "doc"
27 Requires-Dist: sphinx-autodoc-typehints ; extra == "doc"
28 Requires-Dist: sphinx_rtd_theme>=1.3.0 ; extra == "doc"
29 Requires-Dist: dateparser==1.* ; extra == "test"
30 Requires-Dist: pre-commit ; extra == "test"
31 Requires-Dist: pytest ; extra == "test"
32 Requires-Dist: pytest-cov ; extra == "test"
33 Requires-Dist: pytest-mock ; extra == "test"
34 Requires-Dist: pytz==2021.1 ; extra == "test"
35 Requires-Dist: simplejson==3.* ; extra == "test"
36 Project-URL: Documentation, https://arrow.readthedocs.io
37 Project-URL: Issues, https://github.com/arrow-py/arrow/issues
38 Project-URL: Source, https://github.com/arrow-py/arrow
39 Provides-Extra: doc
40 Provides-Extra: test
41
42 Arrow: Better dates & times for Python
43 ======================================
44
45 .. start-inclusion-marker-do-not-remove
46
47 .. image:: https://github.com/arrow-py/arrow/workflows/tests/badge.svg?branch=master
48 :alt: Build Status
49 :target: https://github.com/arrow-py/arrow/actions?query=workflow%3Atests+branch%3Amaster
50
51 .. image:: https://codecov.io/gh/arrow-py/arrow/branch/master/graph/badge.svg
52 :alt: Coverage
53 :target: https://codecov.io/gh/arrow-py/arrow
54
55 .. image:: https://img.shields.io/pypi/v/arrow.svg
56 :alt: PyPI Version
57 :target: https://pypi.python.org/pypi/arrow
58
59 .. image:: https://img.shields.io/pypi/pyversions/arrow.svg
60 :alt: Supported Python Versions
61 :target: https://pypi.python.org/pypi/arrow
62
63 .. image:: https://img.shields.io/pypi/l/arrow.svg
64 :alt: License
65 :target: https://pypi.python.org/pypi/arrow
66
67 .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
68 :alt: Code Style: Black
69 :target: https://github.com/psf/black
70
71
72 **Arrow** is a Python library that offers a sensible and human-friendly approach to creating, manipulating, formatting and converting dates, times and timestamps. It implements and updates the datetime type, plugging gaps in functionality and providing an intelligent module API that supports many common creation scenarios. Simply put, it helps you work with dates and times with fewer imports and a lot less code.
73
74 Arrow is named after the `arrow of time <https://en.wikipedia.org/wiki/Arrow_of_time>`_ and is heavily inspired by `moment.js <https://github.com/moment/moment>`_ and `requests <https://github.com/psf/requests>`_.
75
76 Why use Arrow over built-in modules?
77 ------------------------------------
78
79 Python's standard library and some other low-level modules have near-complete date, time and timezone functionality, but don't work very well from a usability perspective:
80
81 - Too many modules: datetime, time, calendar, dateutil, pytz and more
82 - Too many types: date, time, datetime, tzinfo, timedelta, relativedelta, etc.
83 - Timezones and timestamp conversions are verbose and unpleasant
84 - Timezone naivety is the norm
85 - Gaps in functionality: ISO 8601 parsing, timespans, humanization
86
87 Features
88 --------
89
90 - Fully-implemented, drop-in replacement for datetime
91 - Support for Python 3.6+
92 - Timezone-aware and UTC by default
93 - Super-simple creation options for many common input scenarios
94 - ``shift`` method with support for relative offsets, including weeks
95 - Format and parse strings automatically
96 - Wide support for the `ISO 8601 <https://en.wikipedia.org/wiki/ISO_8601>`_ standard
97 - Timezone conversion
98 - Support for ``dateutil``, ``pytz``, and ``ZoneInfo`` tzinfo objects
99 - Generates time spans, ranges, floors and ceilings for time frames ranging from microsecond to year
100 - Humanize dates and times with a growing list of contributed locales
101 - Extensible for your own Arrow-derived types
102 - Full support for PEP 484-style type hints
103
104 Quick Start
105 -----------
106
107 Installation
108 ~~~~~~~~~~~~
109
110 To install Arrow, use `pip <https://pip.pypa.io/en/stable/quickstart/>`_ or `pipenv <https://docs.pipenv.org>`_:
111
112 .. code-block:: console
113
114 $ pip install -U arrow
115
116 Example Usage
117 ~~~~~~~~~~~~~
118
119 .. code-block:: python
120
121 >>> import arrow
122 >>> arrow.get('2013-05-11T21:23:58.970460+07:00')
123 <Arrow [2013-05-11T21:23:58.970460+07:00]>
124
125 >>> utc = arrow.utcnow()
126 >>> utc
127 <Arrow [2013-05-11T21:23:58.970460+00:00]>
128
129 >>> utc = utc.shift(hours=-1)
130 >>> utc
131 <Arrow [2013-05-11T20:23:58.970460+00:00]>
132
133 >>> local = utc.to('US/Pacific')
134 >>> local
135 <Arrow [2013-05-11T13:23:58.970460-07:00]>
136
137 >>> local.timestamp()
138 1368303838.970460
139
140 >>> local.format()
141 '2013-05-11 13:23:58 -07:00'
142
143 >>> local.format('YYYY-MM-DD HH:mm:ss ZZ')
144 '2013-05-11 13:23:58 -07:00'
145
146 >>> local.humanize()
147 'an hour ago'
148
149 >>> local.humanize(locale='ko-kr')
150 '한시간 전'
151
152 .. end-inclusion-marker-do-not-remove
153
154 Documentation
155 -------------
156
157 For full documentation, please visit `arrow.readthedocs.io <https://arrow.readthedocs.io>`_.
158
159 Contributing
160 ------------
161
162 Contributions are welcome for both code and localizations (adding and updating locales). Begin by gaining familiarity with the Arrow library and its features. Then, jump into contributing:
163
164 #. Find an issue or feature to tackle on the `issue tracker <https://github.com/arrow-py/arrow/issues>`_. Issues marked with the `"good first issue" label <https://github.com/arrow-py/arrow/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22>`_ may be a great place to start!
165 #. Fork `this repository <https://github.com/arrow-py/arrow>`_ on GitHub and begin making changes in a branch.
166 #. Add a few tests to ensure that the bug was fixed or the feature works as expected.
167 #. Run the entire test suite and linting checks by running one of the following commands: ``tox && tox -e lint,docs`` (if you have `tox <https://tox.readthedocs.io>`_ installed) **OR** ``make build39 && make test && make lint`` (if you do not have Python 3.9 installed, replace ``build39`` with the latest Python version on your system).
168 #. Submit a pull request and await feedback 😃.
169
170 If you have any questions along the way, feel free to ask them `here <https://github.com/arrow-py/arrow/discussions>`_.
171
172 Support Arrow
173 -------------
174
175 `Open Collective <https://opencollective.com/>`_ is an online funding platform that provides tools to raise money and share your finances with full transparency. It is the platform of choice for individuals and companies to make one-time or recurring donations directly to the project. If you are interested in making a financial contribution, please visit the `Arrow collective <https://opencollective.com/arrow>`_.
176