schengulator


Nameschengulator JSON
Version 0.0.5 PyPI version JSON
download
home_pagehttps://github.com/PennyHow/schengulator
SummaryA tool to calculate how many days an individual has been in Schengen countries out of a specified 180-day period
upload_time2024-01-18 20:46:47
maintainer
docs_urlNone
authorPenelope How
requires_python>=3
license
keywords schengen travel movement europe
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Schengulator

[![Documentation Status](https://readthedocs.org/projects/schengulator/badge/?version=latest)](https://schengulator.readthedocs.io/en/latest/?badge=latest) [![PyPI version](https://badge.fury.io/py/schengulator.svg)](https://badge.fury.io/py/schengulator)

Schengulator is a tool to calculate how many days an individual has been in Schengen countries out of a specified 180-day period.

## The Schengen Visa Rule

The schengulator determines the number of days spent and remaining based on the 90/180-day Schengen Visa Rule, where an individual can stay in Schengen countries for 90 days out of an 180 day time period. The 180-day window is defined as:
    
*"The 180-day period keeps rolling. Therefore, anytime you wish to enter the Schengen, you just have to count backwards the last 180 days, and see if you have been present in the Schengen for more than 90 days throughout that period"* (as stated [here](https://www.schengenvisainfo.com/visa-calculator))

Therefore, schengulator calculates the days spent in the Schengen area based on the 180 days prior to a user-defined date.

For more on the Schengen Visa Rule, see these links:
+ [Schengen visa info](https://www.schengenvisainfo.com)
+ [The 90/180-day rule made easy](https://newlandchase.com/the-schengen-areas-90-180-day-rule-made-easy/)
+ [UK Government on visa permits in Europe](https://www.gov.uk/guidance/check-if-you-need-a-visa-or-permit-for-europe)
+ [The Schengen rule: here's how it works](https://www.frenchentree.com/brexit/eu-90-180-day-rule-heres-how-it-works/)

There are many Schengen stay calculators available online or as apps. The purpose of schengulator is to create a workflow that is **transparent** (i.e. you can see the workings) and **non-repetitive** (i.e. you don't have to log each and every one of your trips to the Schengen area every time you need to use the tool).
 

## Quickstart
To get started, install schengulator using pip.

```python
pip install schengulator
```

Check that the package works by opening a python console and importing it.

```python
python3
import schengulator
```

There are a number of examples in the scripts provided in the [examples](https://github.com/PennyHow/schengulator/tree/main/examples) directory of the [schengulator Github repository](https://github.com/PennyHow/schengulator) to test the installation and see how it works. 

```python
from schengulator.schengulator import SchengenStay, /
     checkStay, checkDaysLeft, staysFromCSV

# Example 1. Check Schengen stays from specific date 
# using SchengenStay obj

# Initialise Schengen evaluation from 01/05/2022
ss = SchengenStay('2022-05-01')

# Add all stays
ss.addStay('2021-07-01', '2021-07-15')      # Greece
ss.addStay('2021-09-03', '2021-09-08')      # Netherlands
ss.addStay('2021-09-20', '2021-09-25')      # Belgium
ss.addStay('2021-12-20', '2022-01-03')      # Belgium
ss.addStay('2022-04-18', '2022-05-01')      # Italy

# Check number of days spent in Schengen on 01/05/2022
flag = ss.checkDays()
if flag==True:
    print('All okay!')
    
 
    
# Example 2. Check Schengen stays for all dates in 
# proposed future stay

# Create list of all stays
trips = [['2021-07-01','2021-07-15'],     # Greece
        ['2021-09-03', '2021-09-08'],     # Netherlands
        ['2021-09-20', '2021-09-25'],     # Belgium
        ['2021-12-20', '2022-01-03'],     # Belgium
        ['2022-04-18', '2022-05-01']]     # Italy

# Check if new stay is within Schengen 90-day limits
checkStay(['2022-04-18', '2022-05-01'], trips[:-1])

# See how many days left in Schengen after proposed trip
checkDaysLeft(trips)



# Example 3. Check Schengen stays from CSV file

# Import stays from csv file
infile = 'examples/example_stays.csv'
csv_trips = staysFromCSV(infile)

# Check if new trip is within Schengen 90-day limits
new_trip = ['2022-01-05', '2022-01-20']
checkStay(new_trip, csv_trips)

# Check how many days left in Schengen after new trip
csv_trips.append(new_trip)
checkDaysLeft(csv_trips, d=new_trip[1]) 
```

## Acknowledgements
This tool was inspired by these related python repositories:
+ [schengen](https://github.com/weddige/schengen)
+ [schengencalc](https://github.com/nuno-filipe/schengencalc)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PennyHow/schengulator",
    "name": "schengulator",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": "",
    "keywords": "schengen travel movement europe",
    "author": "Penelope How",
    "author_email": "pennyruthhow@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ff/fc/244d48c929466cf3214decf7e1ed584e232ebc2c149bd451cc831395f941/schengulator-0.0.5.tar.gz",
    "platform": null,
    "description": "# Schengulator\n\n[![Documentation Status](https://readthedocs.org/projects/schengulator/badge/?version=latest)](https://schengulator.readthedocs.io/en/latest/?badge=latest) [![PyPI version](https://badge.fury.io/py/schengulator.svg)](https://badge.fury.io/py/schengulator)\n\nSchengulator is a tool to calculate how many days an individual has been in Schengen countries out of a specified 180-day period.\n\n## The Schengen Visa Rule\n\nThe schengulator determines the number of days spent and remaining based on the 90/180-day Schengen Visa Rule, where an individual can stay in Schengen countries for 90 days out of an 180 day time period. The 180-day window is defined as:\n    \n*\"The 180-day period keeps rolling. Therefore, anytime you wish to enter the Schengen, you just have to count backwards the last 180 days, and see if you have been present in the Schengen for more than 90 days throughout that period\"* (as stated [here](https://www.schengenvisainfo.com/visa-calculator))\n\nTherefore, schengulator calculates the days spent in the Schengen area based on the 180 days prior to a user-defined date.\n\nFor more on the Schengen Visa Rule, see these links:\n+ [Schengen visa info](https://www.schengenvisainfo.com)\n+ [The 90/180-day rule made easy](https://newlandchase.com/the-schengen-areas-90-180-day-rule-made-easy/)\n+ [UK Government on visa permits in Europe](https://www.gov.uk/guidance/check-if-you-need-a-visa-or-permit-for-europe)\n+ [The Schengen rule: here's how it works](https://www.frenchentree.com/brexit/eu-90-180-day-rule-heres-how-it-works/)\n\nThere are many Schengen stay calculators available online or as apps. The purpose of schengulator is to create a workflow that is **transparent** (i.e. you can see the workings) and **non-repetitive** (i.e. you don't have to log each and every one of your trips to the Schengen area every time you need to use the tool).\n \n\n## Quickstart\nTo get started, install schengulator using pip.\n\n```python\npip install schengulator\n```\n\nCheck that the package works by opening a python console and importing it.\n\n```python\npython3\nimport schengulator\n```\n\nThere are a number of examples in the scripts provided in the [examples](https://github.com/PennyHow/schengulator/tree/main/examples) directory of the [schengulator Github repository](https://github.com/PennyHow/schengulator) to test the installation and see how it works. \n\n```python\nfrom schengulator.schengulator import SchengenStay, /\n     checkStay, checkDaysLeft, staysFromCSV\n\n# Example 1. Check Schengen stays from specific date \n# using SchengenStay obj\n\n# Initialise Schengen evaluation from 01/05/2022\nss = SchengenStay('2022-05-01')\n\n# Add all stays\nss.addStay('2021-07-01', '2021-07-15')      # Greece\nss.addStay('2021-09-03', '2021-09-08')      # Netherlands\nss.addStay('2021-09-20', '2021-09-25')      # Belgium\nss.addStay('2021-12-20', '2022-01-03')      # Belgium\nss.addStay('2022-04-18', '2022-05-01')      # Italy\n\n# Check number of days spent in Schengen on 01/05/2022\nflag = ss.checkDays()\nif flag==True:\n    print('All okay!')\n    \n \n    \n# Example 2. Check Schengen stays for all dates in \n# proposed future stay\n\n# Create list of all stays\ntrips = [['2021-07-01','2021-07-15'],     # Greece\n        ['2021-09-03', '2021-09-08'],     # Netherlands\n        ['2021-09-20', '2021-09-25'],     # Belgium\n        ['2021-12-20', '2022-01-03'],     # Belgium\n        ['2022-04-18', '2022-05-01']]     # Italy\n\n# Check if new stay is within Schengen 90-day limits\ncheckStay(['2022-04-18', '2022-05-01'], trips[:-1])\n\n# See how many days left in Schengen after proposed trip\ncheckDaysLeft(trips)\n\n\n\n# Example 3. Check Schengen stays from CSV file\n\n# Import stays from csv file\ninfile = 'examples/example_stays.csv'\ncsv_trips = staysFromCSV(infile)\n\n# Check if new trip is within Schengen 90-day limits\nnew_trip = ['2022-01-05', '2022-01-20']\ncheckStay(new_trip, csv_trips)\n\n# Check how many days left in Schengen after new trip\ncsv_trips.append(new_trip)\ncheckDaysLeft(csv_trips, d=new_trip[1]) \n```\n\n## Acknowledgements\nThis tool was inspired by these related python repositories:\n+ [schengen](https://github.com/weddige/schengen)\n+ [schengencalc](https://github.com/nuno-filipe/schengencalc)\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A tool to calculate how many days an individual has been in Schengen countries out of a specified 180-day period",
    "version": "0.0.5",
    "project_urls": {
        "Homepage": "https://github.com/PennyHow/schengulator"
    },
    "split_keywords": [
        "schengen",
        "travel",
        "movement",
        "europe"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "61da19b7c15e75a8710222469c4e0bc1609da644e11dd4abd9e0478377356bf1",
                "md5": "4929be7b4ed69c87096091e7ffc88dce",
                "sha256": "41199d05a4efead194f2875506b3dc0d583f4987b59bca0cf20ba180c100abfa"
            },
            "downloads": -1,
            "filename": "schengulator-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4929be7b4ed69c87096091e7ffc88dce",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 7422,
            "upload_time": "2024-01-18T20:46:45",
            "upload_time_iso_8601": "2024-01-18T20:46:45.838153Z",
            "url": "https://files.pythonhosted.org/packages/61/da/19b7c15e75a8710222469c4e0bc1609da644e11dd4abd9e0478377356bf1/schengulator-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fffc244d48c929466cf3214decf7e1ed584e232ebc2c149bd451cc831395f941",
                "md5": "8397ff23a86e0bf78d6f56f79782449f",
                "sha256": "122bef119595c3304fb31a667bb039b7edd4793ed37e24cdf26848659ec54f62"
            },
            "downloads": -1,
            "filename": "schengulator-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "8397ff23a86e0bf78d6f56f79782449f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 6719,
            "upload_time": "2024-01-18T20:46:47",
            "upload_time_iso_8601": "2024-01-18T20:46:47.682445Z",
            "url": "https://files.pythonhosted.org/packages/ff/fc/244d48c929466cf3214decf7e1ed584e232ebc2c149bd451cc831395f941/schengulator-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-18 20:46:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PennyHow",
    "github_project": "schengulator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "schengulator"
}
        
Elapsed time: 0.20369s