Metadata-Version: 2.1
Name: getids
Version: 1.1.0
Summary: A Python port of the GetIDs engine that calculates the date of creation for Telegram accounts using known creation dates.
Author-email: Amano LLC <contact@amanoteam.com>
License: MIT License
        
        Copyright (c) 2019 Jonas Zohren
        Copyright (c) 2020-2023 Amano LLC
        
        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.
        
Project-URL: homepage, https://github.com/AmanoTeam/python-getids
Requires-Python: >=3.7
Description-Content-Type: text/x-rst
License-File: LICENSE

python GetIDs
=============

This is a Python port of the GetIDs engine that calculates the date of
creation for Telegram accounts using known creation dates.

The original repository can be found
`here <https://github.com/wjclub/telegram-bot-getids>`__.

Installation
------------

.. code:: bash

   $ pip install -U getids

Usage
-----

You can use the package in two ways:

Interactively
~~~~~~~~~~~~~

.. code:: bash

   $ python -m getids 1234567 200097591 2000000000

Expected output:
^^^^^^^^^^^^^^^^

.. code:: text

   1234567: older_than 10/2013
   200097591: aprox 5/2016
   2000000000: newer_than 10/2021

From python code
~~~~~~~~~~~~~~~~

.. code:: python

   >>> from getids import get_date_as_string, get_date_as_datetime
   >>>
   >>> get_date_as_string(1234567)
   ('older_than', '10/2013')
   >>> get_date_as_string(200097591)
   ('aprox', '5/2016')
   >>> get_date_as_string(2000000000)
   ('newer_than', '10/2021')
   >>>
   >>> get_date_as_datetime(1234567)
   (-1, datetime.datetime(2013, 10, 31, 22, 0))
   >>> get_date_as_datetime(200097591)
   (0, datetime.datetime(2016, 5, 6, 17, 25, 6))
   >>> get_date_as_datetime(2000000000)
   (1, datetime.datetime(2021, 10, 11, 21, 53, 20))

Note: The ``get_date_as_datetime`` function is seen as a low-level
function, since it returns a specific date, which is not wanted in
most cases, since the date is not accurate.
