https://github.com/alt-f1/countries-utils
Get the list of countries stored in the field 'place' in transactions stored in twikey
https://github.com/alt-f1/countries-utils
Last synced: 7 months ago
JSON representation
Get the list of countries stored in the field 'place' in transactions stored in twikey
- Host: GitHub
- URL: https://github.com/alt-f1/countries-utils
- Owner: ALT-F1
- License: other
- Created: 2019-12-22T11:36:10.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-15T14:09:28.000Z (almost 2 years ago)
- Last Synced: 2025-01-21T00:15:02.950Z (9 months ago)
- Language: Python
- Size: 689 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# countries-utils
Utils used by the dunning service wrapper. See
* Get the list of countries stored in the field "place" in transactions stored in twikey.
* The places are written either in FR, EN or NL.
* The method returns a List of places in English and a Set of those places if the places are using the above-mentioned languages## usage
* install the package from the **pypi.org** :
* install : `pip install countries-utils`
* upgrade : `pip install countries-utils --upgrade`* install the package from the **test.pypi.org** :
* install : `pip install -i https://test.pypi.org/simple/ countries-utils`
* upgrade : `pip install -i https://test.pypi.org/simple/ countries-utils --upgrade`## dependencies
* pycountry :
* country_list :## Build the package
* build the setup.py
* `python setup.py sdist bdist_wheel`* upload the library on TEST **pypi.org**
* `python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*`
* Source :* upload the library on PROD **pypi.org**
* `python -m twine upload dist/*`
* Source :## test the library
* `cd countries_list`
* `pipenv run python countries_utils_unittest.py`* locate the package
* `python -c "import countries_utils as _; print(_.__path__)"`
* list functions inside the module
* the package `python -c "import countries_utils as _; print(dir(_))"`* test the package
* `python -c "import countries_utils, pandas as pd, numpy as np; print(countries_utils.get_list_of_countries_in_text(
pd.DataFrame(np.array(['Belgium', 'Frankrijk', 'Royaume-Uni']), columns=['place']),
place='place',
languages_to_check=['en', 'fr', 'nl']
)
)"`
* result : `(['Belgium', 'France', 'United Kingdom'], {'United Kingdom', 'France', 'Belgium'})`## Documentation
* Packaging Python Projects
* Managing Application Dependencies
* Packaging and distributing projects## License
Copyright (c) ALT-F1 SPRL, Abdelkrim Boujraf. All rights reserved.
Licensed under the EUPL License, Version 1.2.
See LICENSE in the project root for license information.