METADATA 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. Metadata-Version: 2.1
  2. Name: email_validator
  3. Version: 2.2.0
  4. Summary: A robust email address syntax and deliverability validation library.
  5. Home-page: https://github.com/JoshData/python-email-validator
  6. Author: Joshua Tauberer
  7. Author-email: jt@occams.info
  8. License: Unlicense
  9. Keywords: email address validator
  10. Classifier: Development Status :: 5 - Production/Stable
  11. Classifier: Intended Audience :: Developers
  12. Classifier: License :: OSI Approved :: The Unlicense (Unlicense)
  13. Classifier: Programming Language :: Python :: 3
  14. Classifier: Programming Language :: Python :: 3.8
  15. Classifier: Programming Language :: Python :: 3.9
  16. Classifier: Programming Language :: Python :: 3.10
  17. Classifier: Programming Language :: Python :: 3.11
  18. Classifier: Programming Language :: Python :: 3.12
  19. Classifier: Topic :: Software Development :: Libraries :: Python Modules
  20. Requires-Python: >=3.8
  21. Description-Content-Type: text/markdown
  22. License-File: LICENSE
  23. Requires-Dist: dnspython >=2.0.0
  24. Requires-Dist: idna >=2.0.0
  25. email-validator: Validate Email Addresses
  26. =========================================
  27. A robust email address syntax and deliverability validation library for
  28. Python 3.8+ by [Joshua Tauberer](https://joshdata.me).
  29. This library validates that a string is of the form `name@example.com`
  30. and optionally checks that the domain name is set up to receive email.
  31. This is the sort of validation you would want when you are identifying
  32. users by their email address like on a registration form.
  33. Key features:
  34. * Checks that an email address has the correct syntax --- great for
  35. email-based registration/login forms or validing data.
  36. * Gives friendly English error messages when validation fails that you
  37. can display to end-users.
  38. * Checks deliverability (optional): Does the domain name resolve?
  39. (You can override the default DNS resolver to add query caching.)
  40. * Supports internationalized domain names (like `@ツ.life`),
  41. internationalized local parts (like `ツ@example.com`),
  42. and optionally parses display names (e.g. `"My Name" <me@example.com>`).
  43. * Rejects addresses with invalid or unsafe Unicode characters,
  44. obsolete email address syntax that you'd find unexpected,
  45. special use domain names like `@localhost`,
  46. and domains without a dot by default.
  47. This is an opinionated library!
  48. * Normalizes email addresses (important for internationalized
  49. and quoted-string addresses! see below).
  50. * Python type annotations are used.
  51. This is an opinionated library. You should definitely also consider using
  52. the less-opinionated [pyIsEmail](https://github.com/michaelherold/pyIsEmail)
  53. if it works better for you.
  54. [![Build Status](https://github.com/JoshData/python-email-validator/actions/workflows/test_and_build.yaml/badge.svg)](https://github.com/JoshData/python-email-validator/actions/workflows/test_and_build.yaml)
  55. View the [CHANGELOG / Release Notes](CHANGELOG.md) for the version history of changes in the library. Occasionally this README is ahead of the latest published package --- see the CHANGELOG for details.
  56. ---
  57. Installation
  58. ------------
  59. This package [is on PyPI](https://pypi.org/project/email-validator/), so:
  60. ```sh
  61. pip install email-validator
  62. ```
  63. (You might need to use `pip3` depending on your local environment.)
  64. Quick Start
  65. -----------
  66. If you're validating a user's email address before creating a user
  67. account in your application, you might do this:
  68. ```python
  69. from email_validator import validate_email, EmailNotValidError
  70. email = "my+address@example.org"
  71. try:
  72. # Check that the email address is valid. Turn on check_deliverability
  73. # for first-time validations like on account creation pages (but not
  74. # login pages).
  75. emailinfo = validate_email(email, check_deliverability=False)
  76. # After this point, use only the normalized form of the email address,
  77. # especially before going to a database query.
  78. email = emailinfo.normalized
  79. except EmailNotValidError as e:
  80. # The exception message is human-readable explanation of why it's
  81. # not a valid (or deliverable) email address.
  82. print(str(e))
  83. ```
  84. This validates the address and gives you its normalized form. You should
  85. **put the normalized form in your database** and always normalize before
  86. checking if an address is in your database. When using this in a login form,
  87. set `check_deliverability` to `False` to avoid unnecessary DNS queries.
  88. Usage
  89. -----
  90. ### Overview
  91. The module provides a function `validate_email(email_address)` which
  92. takes an email address and:
  93. - Raises a `EmailNotValidError` with a helpful, human-readable error
  94. message explaining why the email address is not valid, or
  95. - Returns an object with a normalized form of the email address (which
  96. you should use!) and other information about it.
  97. When an email address is not valid, `validate_email` raises either an
  98. `EmailSyntaxError` if the form of the address is invalid or an
  99. `EmailUndeliverableError` if the domain name fails DNS checks. Both
  100. exception classes are subclasses of `EmailNotValidError`, which in turn
  101. is a subclass of `ValueError`.
  102. But when an email address is valid, an object is returned containing
  103. a normalized form of the email address (which you should use!) and
  104. other information.
  105. The validator doesn't, by default, permit obsoleted forms of email addresses
  106. that no one uses anymore even though they are still valid and deliverable, since
  107. they will probably give you grief if you're using email for login. (See
  108. later in the document about how to allow some obsolete forms.)
  109. The validator optionally checks that the domain name in the email address has
  110. a DNS MX record indicating that it can receive email. (Except a Null MX record.
  111. If there is no MX record, a fallback A/AAAA-record is permitted, unless
  112. a reject-all SPF record is present.) DNS is slow and sometimes unavailable or
  113. unreliable, so consider whether these checks are useful for your use case and
  114. turn them off if they aren't.
  115. There is nothing to be gained by trying to actually contact an SMTP server, so
  116. that's not done here. For privacy, security, and practicality reasons, servers
  117. are good at not giving away whether an address is
  118. deliverable or not: email addresses that appear to accept mail at first
  119. can bounce mail after a delay, and bounced mail may indicate a temporary
  120. failure of a good email address (sometimes an intentional failure, like
  121. greylisting).
  122. ### Options
  123. The `validate_email` function also accepts the following keyword arguments
  124. (defaults are as shown below):
  125. `check_deliverability=True`: If true, DNS queries are made to check that the domain name in the email address (the part after the @-sign) can receive mail, as described above. Set to `False` to skip this DNS-based check. It is recommended to pass `False` when performing validation for login pages (but not account creation pages) since re-validation of a previously validated domain in your database by querying DNS at every login is probably undesirable. You can also set `email_validator.CHECK_DELIVERABILITY` to `False` to turn this off for all calls by default.
  126. `dns_resolver=None`: Pass an instance of [dns.resolver.Resolver](https://dnspython.readthedocs.io/en/latest/resolver-class.html) to control the DNS resolver including setting a timeout and [a cache](https://dnspython.readthedocs.io/en/latest/resolver-caching.html). The `caching_resolver` function shown below is a helper function to construct a dns.resolver.Resolver with a [LRUCache](https://dnspython.readthedocs.io/en/latest/resolver-caching.html#dns.resolver.LRUCache). Reuse the same resolver instance across calls to `validate_email` to make use of the cache.
  127. `test_environment=False`: If `True`, DNS-based deliverability checks are disabled and `test` and `**.test` domain names are permitted (see below). You can also set `email_validator.TEST_ENVIRONMENT` to `True` to turn it on for all calls by default.
  128. `allow_smtputf8=True`: Set to `False` to prohibit internationalized addresses that would
  129. require the
  130. [SMTPUTF8](https://tools.ietf.org/html/rfc6531) extension. You can also set `email_validator.ALLOW_SMTPUTF8` to `False` to turn it off for all calls by default.
  131. `allow_quoted_local=False`: Set to `True` to allow obscure and potentially problematic email addresses in which the part of the address before the @-sign contains spaces, @-signs, or other surprising characters when the local part is surrounded in quotes (so-called quoted-string local parts). In the object returned by `validate_email`, the normalized local part removes any unnecessary backslash-escaping and even removes the surrounding quotes if the address would be valid without them. You can also set `email_validator.ALLOW_QUOTED_LOCAL` to `True` to turn this on for all calls by default.
  132. `allow_domain_literal=False`: Set to `True` to allow bracketed IPv4 and "IPv6:"-prefixd IPv6 addresses in the domain part of the email address. No deliverability checks are performed for these addresses. In the object returned by `validate_email`, the normalized domain will use the condensed IPv6 format, if applicable. The object's `domain_address` attribute will hold the parsed `ipaddress.IPv4Address` or `ipaddress.IPv6Address` object if applicable. You can also set `email_validator.ALLOW_DOMAIN_LITERAL` to `True` to turn this on for all calls by default.
  133. `allow_display_name=False`: Set to `True` to allow a display name and bracketed address in the input string, like `My Name <me@example.org>`. It's implemented in the spirit but not the letter of RFC 5322 3.4, so it may be stricter or more relaxed than what you want. The display name, if present, is provided in the returned object's `display_name` field after being unquoted and unescaped. You can also set `email_validator.ALLOW_DISPLAY_NAME` to `True` to turn this on for all calls by default.
  134. `allow_empty_local=False`: Set to `True` to allow an empty local part (i.e.
  135. `@example.com`), e.g. for validating Postfix aliases.
  136. ### DNS timeout and cache
  137. When validating many email addresses or to control the timeout (the default is 15 seconds), create a caching [dns.resolver.Resolver](https://dnspython.readthedocs.io/en/latest/resolver-class.html) to reuse in each call. The `caching_resolver` function returns one easily for you:
  138. ```python
  139. from email_validator import validate_email, caching_resolver
  140. resolver = caching_resolver(timeout=10)
  141. while True:
  142. validate_email(email, dns_resolver=resolver)
  143. ```
  144. ### Test addresses
  145. This library rejects email addresses that use the [Special Use Domain Names](https://www.iana.org/assignments/special-use-domain-names/special-use-domain-names.xhtml) `invalid`, `localhost`, `test`, and some others by raising `EmailSyntaxError`. This is to protect your system from abuse: You probably don't want a user to be able to cause an email to be sent to `localhost` (although they might be able to still do so via a malicious MX record). However, in your non-production test environments you may want to use `@test` or `@myname.test` email addresses. There are three ways you can allow this:
  146. 1. Add `test_environment=True` to the call to `validate_email` (see above).
  147. 2. Set `email_validator.TEST_ENVIRONMENT` to `True` globally.
  148. 3. Remove the special-use domain name that you want to use from `email_validator.SPECIAL_USE_DOMAIN_NAMES`, e.g.:
  149. ```python
  150. import email_validator
  151. email_validator.SPECIAL_USE_DOMAIN_NAMES.remove("test")
  152. ```
  153. It is tempting to use `@example.com/net/org` in tests. They are *not* in this library's `SPECIAL_USE_DOMAIN_NAMES` list so you can, but shouldn't, use them. These domains are reserved to IANA for use in documentation so there is no risk of accidentally emailing someone at those domains. But beware that this library will nevertheless reject these domain names if DNS-based deliverability checks are not disabled because these domains do not resolve to domains that accept email. In tests, consider using your own domain name or `@test` or `@myname.test` instead.
  154. Internationalized email addresses
  155. ---------------------------------
  156. The email protocol SMTP and the domain name system DNS have historically
  157. only allowed English (ASCII) characters in email addresses and domain names,
  158. respectively. Each has adapted to internationalization in a separate
  159. way, creating two separate aspects to email address internationalization.
  160. (If your mail submission library doesn't support Unicode at all, then
  161. immediately prior to mail submission you must replace the email address with
  162. its ASCII-ized form. This library gives you back the ASCII-ized form in the
  163. `ascii_email` field in the returned object.)
  164. ### Internationalized domain names (IDN)
  165. The first is [internationalized domain names (RFC
  166. 5891)](https://tools.ietf.org/html/rfc5891), a.k.a IDNA 2008. The DNS
  167. system has not been updated with Unicode support. Instead, internationalized
  168. domain names are converted into a special IDNA ASCII "[Punycode](https://www.rfc-editor.org/rfc/rfc3492.txt)"
  169. form starting with `xn--`. When an email address has non-ASCII
  170. characters in its domain part, the domain part is replaced with its IDNA
  171. ASCII equivalent form in the process of mail transmission. Your mail
  172. submission library probably does this for you transparently. ([Compliance
  173. around the web is not very good though](http://archives.miloush.net/michkap/archive/2012/02/27/10273315.html).) This library conforms to IDNA 2008
  174. using the [idna](https://github.com/kjd/idna) module by Kim Davies.
  175. ### Internationalized local parts
  176. The second sort of internationalization is internationalization in the
  177. *local* part of the address (before the @-sign). In non-internationalized
  178. email addresses, only English letters, numbers, and some punctuation
  179. (`._!#$%&'^``*+-=~/?{|}`) are allowed. In internationalized email address
  180. local parts, a wider range of Unicode characters are allowed.
  181. Email addresses with these non-ASCII characters require that your mail
  182. submission library and all the mail servers along the route to the destination,
  183. including your own outbound mail server, all support the
  184. [SMTPUTF8 (RFC 6531)](https://tools.ietf.org/html/rfc6531) extension.
  185. Support for SMTPUTF8 varies. If you know ahead of time that SMTPUTF8 is not
  186. supported by your mail submission stack, then you must filter out addresses that
  187. require SMTPUTF8 using the `allow_smtputf8=False` keyword argument (see above).
  188. This will cause the validation function to raise a `EmailSyntaxError` if
  189. delivery would require SMTPUTF8. If you do not set `allow_smtputf8=False`,
  190. you can also check the value of the `smtputf8` field in the returned object.
  191. ### Unsafe Unicode characters are rejected
  192. A surprisingly large number of Unicode characters are not safe to display,
  193. especially when the email address is concatenated with other text, so this
  194. library tries to protect you by not permitting reserved, non-, private use,
  195. formatting (which can be used to alter the display order of characters),
  196. whitespace, and control characters, and combining characters
  197. as the first character of the local part and the domain name (so that they
  198. cannot combine with something outside of the email address string or with
  199. the @-sign). See https://qntm.org/safe and https://trojansource.codes/
  200. for relevant prior work. (Other than whitespace, these are checks that
  201. you should be applying to nearly all user inputs in a security-sensitive
  202. context.) This does not guard against the well known problem that many
  203. Unicode characters look alike, which can be used to fool humans reading
  204. displayed text.
  205. Normalization
  206. -------------
  207. ### Unicode Normalization
  208. The use of Unicode in email addresses introduced a normalization
  209. problem. Different Unicode strings can look identical and have the same
  210. semantic meaning to the user. The `normalized` field returned on successful
  211. validation provides the correctly normalized form of the given email
  212. address.
  213. For example, the CJK fullwidth Latin letters are considered semantically
  214. equivalent in domain names to their ASCII counterparts. This library
  215. normalizes them to their ASCII counterparts (as required by IDNA):
  216. ```python
  217. emailinfo = validate_email("me@Domain.com")
  218. print(emailinfo.normalized)
  219. print(emailinfo.ascii_email)
  220. # prints "me@domain.com" twice
  221. ```
  222. Because an end-user might type their email address in different (but
  223. equivalent) un-normalized forms at different times, you ought to
  224. replace what they enter with the normalized form immediately prior to
  225. going into your database (during account creation), querying your database
  226. (during login), or sending outbound mail.
  227. The normalizations include lowercasing the domain part of the email
  228. address (domain names are case-insensitive), [Unicode "NFC"
  229. normalization](https://en.wikipedia.org/wiki/Unicode_equivalence) of the
  230. whole address (which turns characters plus [combining
  231. characters](https://en.wikipedia.org/wiki/Combining_character) into
  232. precomposed characters where possible, replacement of [fullwidth and
  233. halfwidth
  234. characters](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms)
  235. in the domain part, possibly other
  236. [UTS46](http://unicode.org/reports/tr46) mappings on the domain part,
  237. and conversion from Punycode to Unicode characters.
  238. Normalization may change the characters in the email address and the
  239. length of the email address, such that a string might be a valid address
  240. before normalization but invalid after, or vice versa. This library only
  241. permits addresses that are valid both before and after normalization.
  242. (See [RFC 6532 (internationalized email) section
  243. 3.1](https://tools.ietf.org/html/rfc6532#section-3.1) and [RFC 5895
  244. (IDNA 2008) section 2](http://www.ietf.org/rfc/rfc5895.txt).)
  245. ### Other Normalization
  246. Normalization is also applied to quoted-string local parts and domain
  247. literal IPv6 addresses if you have allowed them by the `allow_quoted_local`
  248. and `allow_domain_literal` options. In quoted-string local parts, unnecessary
  249. backslash escaping is removed and even the surrounding quotes are removed if
  250. they are unnecessary. For IPv6 domain literals, the IPv6 address is
  251. normalized to condensed form. [RFC 2142](https://datatracker.ietf.org/doc/html/rfc2142)
  252. also requires lowercase normalization for some specific mailbox names like `postmaster@`.
  253. Examples
  254. --------
  255. For the email address `test@joshdata.me`, the returned object is:
  256. ```python
  257. ValidatedEmail(
  258. normalized='test@joshdata.me',
  259. local_part='test',
  260. domain='joshdata.me',
  261. ascii_email='test@joshdata.me',
  262. ascii_local_part='test',
  263. ascii_domain='joshdata.me',
  264. smtputf8=False)
  265. ```
  266. For the fictitious but valid address `example@ツ.ⓁⒾⒻⒺ`, which has an
  267. internationalized domain but ASCII local part, the returned object is:
  268. ```python
  269. ValidatedEmail(
  270. normalized='example@ツ.life',
  271. local_part='example',
  272. domain='ツ.life',
  273. ascii_email='example@xn--bdk.life',
  274. ascii_local_part='example',
  275. ascii_domain='xn--bdk.life',
  276. smtputf8=False)
  277. ```
  278. Note that `normalized` and other fields provide a normalized form of the
  279. email address, domain name, and (in other cases) local part (see earlier
  280. discussion of normalization), which you should use in your database.
  281. Calling `validate_email` with the ASCII form of the above email address,
  282. `example@xn--bdk.life`, returns the exact same information (i.e., the
  283. `normalized` field always will contain Unicode characters, not Punycode).
  284. For the fictitious address `ツ-test@joshdata.me`, which has an
  285. internationalized local part, the returned object is:
  286. ```python
  287. ValidatedEmail(
  288. normalized='ツ-test@joshdata.me',
  289. local_part='ツ-test',
  290. domain='joshdata.me',
  291. ascii_email=None,
  292. ascii_local_part=None,
  293. ascii_domain='joshdata.me',
  294. smtputf8=True)
  295. ```
  296. Now `smtputf8` is `True` and `ascii_email` is `None` because the local
  297. part of the address is internationalized. The `local_part` and `normalized` fields
  298. return the normalized form of the address.
  299. Return value
  300. ------------
  301. When an email address passes validation, the fields in the returned object
  302. are:
  303. | Field | Value |
  304. | -----:|-------|
  305. | `normalized` | The normalized form of the email address that you should put in your database. This combines the `local_part` and `domain` fields (see below). |
  306. | `ascii_email` | If set, an ASCII-only form of the normalized email address by replacing the domain part with [IDNA](https://tools.ietf.org/html/rfc5891) [Punycode](https://www.rfc-editor.org/rfc/rfc3492.txt). This field will be present when an ASCII-only form of the email address exists (including if the email address is already ASCII). If the local part of the email address contains internationalized characters, `ascii_email` will be `None`. If set, it merely combines `ascii_local_part` and `ascii_domain`. |
  307. | `local_part` | The normalized local part of the given email address (before the @-sign). Normalization includes Unicode NFC normalization and removing unnecessary quoted-string quotes and backslashes. If `allow_quoted_local` is True and the surrounding quotes are necessary, the quotes _will_ be present in this field. |
  308. | `ascii_local_part` | If set, the local part, which is composed of ASCII characters only. |
  309. | `domain` | The canonical internationalized Unicode form of the domain part of the email address. If the returned string contains non-ASCII characters, either the [SMTPUTF8](https://tools.ietf.org/html/rfc6531) feature of your mail relay will be required to transmit the message or else the email address's domain part must be converted to IDNA ASCII first: Use `ascii_domain` field instead. |
  310. | `ascii_domain` | The [IDNA](https://tools.ietf.org/html/rfc5891) [Punycode](https://www.rfc-editor.org/rfc/rfc3492.txt)-encoded form of the domain part of the given email address, as it would be transmitted on the wire. |
  311. | `domain_address` | If domain literals are allowed and if the email address contains one, an `ipaddress.IPv4Address` or `ipaddress.IPv6Address` object. |
  312. | `display_name` | If no display name was present and angle brackets do not surround the address, this will be `None`; otherwise, it will be set to the display name, or the empty string if there were angle brackets but no display name. If the display name was quoted, it will be unquoted and unescaped. |
  313. | `smtputf8` | A boolean indicating that the [SMTPUTF8](https://tools.ietf.org/html/rfc6531) feature of your mail relay will be required to transmit messages to this address because the local part of the address has non-ASCII characters (the local part cannot be IDNA-encoded). If `allow_smtputf8=False` is passed as an argument, this flag will always be false because an exception is raised if it would have been true. |
  314. | `mx` | A list of (priority, domain) tuples of MX records specified in the DNS for the domain (see [RFC 5321 section 5](https://tools.ietf.org/html/rfc5321#section-5)). May be `None` if the deliverability check could not be completed because of a temporary issue like a timeout. |
  315. | `mx_fallback_type` | `None` if an `MX` record is found. If no MX records are actually specified in DNS and instead are inferred, through an obsolete mechanism, from A or AAAA records, the value is the type of DNS record used instead (`A` or `AAAA`). May be `None` if the deliverability check could not be completed because of a temporary issue like a timeout. |
  316. | `spf` | Any SPF record found while checking deliverability. Only set if the SPF record is queried. |
  317. Assumptions
  318. -----------
  319. By design, this validator does not pass all email addresses that
  320. strictly conform to the standards. Many email address forms are obsolete
  321. or likely to cause trouble:
  322. * The validator assumes the email address is intended to be
  323. usable on the public Internet. The domain part
  324. of the email address must be a resolvable domain name
  325. (see the deliverability checks described above).
  326. Most [Special Use Domain Names](https://www.iana.org/assignments/special-use-domain-names/special-use-domain-names.xhtml)
  327. and their subdomains, as well as
  328. domain names without a `.`, are rejected as a syntax error
  329. (except see the `test_environment` parameter above).
  330. * Obsolete email syntaxes are rejected:
  331. The unusual ["(comment)" syntax](https://github.com/JoshData/python-email-validator/issues/77)
  332. is rejected. Extremely old obsolete syntaxes are
  333. rejected. Quoted-string local parts and domain-literal addresses
  334. are rejected by default, but there are options to allow them (see above).
  335. No one uses these forms anymore, and I can't think of any reason why anyone
  336. using this library would need to accept them.
  337. Testing
  338. -------
  339. Tests can be run using
  340. ```sh
  341. pip install -r test_requirements.txt
  342. make test
  343. ```
  344. Tests run with mocked DNS responses. When adding or changing tests, temporarily turn on the `BUILD_MOCKED_DNS_RESPONSE_DATA` flag in `tests/mocked_dns_responses.py` to re-build the database of mocked responses from live queries.
  345. For Project Maintainers
  346. -----------------------
  347. The package is distributed as a universal wheel and as a source package.
  348. To release:
  349. * Update CHANGELOG.md.
  350. * Update the version number in `email_validator/version.py`.
  351. * Make & push a commit with the new version number and make sure tests pass.
  352. * Make & push a tag (see command below).
  353. * Make a release at https://github.com/JoshData/python-email-validator/releases/new.
  354. * Publish a source and wheel distribution to pypi (see command below).
  355. ```sh
  356. git tag v$(cat email_validator/version.py | sed "s/.* = //" | sed 's/"//g')
  357. git push --tags
  358. ./release_to_pypi.sh
  359. ```
  360. License
  361. -------
  362. This project is free of any copyright restrictions per the [Unlicense](https://unlicense.org/). (Prior to Feb. 4, 2024, the project was made available under the terms of the [CC0 1.0 Universal public domain dedication](http://creativecommons.org/publicdomain/zero/1.0/).) See [LICENSE](LICENSE) and [CONTRIBUTING.md](CONTRIBUTING.md).