### Release Process for Countrynames Library Source: https://github.com/opensanctions/countrynames/blob/main/README.md This snippet outlines the steps for releasing a new version of the countrynames library, including testing, compiling, committing data changes, version bumping, and pushing to remote repositories. ```sh make test compile git commit countrynames/data.py -m "update data.py" bump2version --verbose patch git push --tags && git push origin main ``` -------------------------------- ### Convert Country Names to Codes Source: https://github.com/opensanctions/countrynames/blob/main/README.md Use `countrynames.to_code` to convert country names to their 2-letter codes. Fuzzy matching can be enabled with `fuzzy=True` for approximate matches. It also handles direct code inputs. ```python import countrynames assert 'DE' == countrynames.to_code('Germany') assert 'DE' == countrynames.to_code('Bundesrepublik Deutschland') assert 'DE' == countrynames.to_code('Bundesrepublik Deutschlan', fuzzy=True) assert 'DE' == countrynames.to_code('DE') ``` -------------------------------- ### Convert Country Names to 3-Letter Codes Source: https://github.com/opensanctions/countrynames/blob/main/README.md Use `countrynames.to_code_3` to convert country names to their 3-letter codes. ```python assert 'DEU' == countrynames.to_code_3('Germany') ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.