Skip to content

Commit

Permalink
fix: add Lang enum
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Aug 9, 2023
1 parent 39351ba commit ef5b32c
Showing 1 changed file with 192 additions and 0 deletions.
192 changes: 192 additions & 0 deletions openfoodfacts/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,198 @@ class Environment(str, enum.Enum):
)


Lang = enum.Enum(
"Lang",
[
("cr", "cr"),
("bn", "bn"),
("rm", "rm"),
("kl", "kl"),
("en", "en"),
("tr", "tr"),
("el", "el"),
("or", "or"),
("lu", "lu"),
("xh", "xh"),
("so", "so"),
("zh", "zh"),
("ka", "ka"),
("sq", "sq"),
("pl", "pl"),
("et", "et"),
("ko", "ko"),
("nr", "nr"),
("es", "es"),
("ee", "ee"),
("ml", "ml"),
("cv", "cv"),
("la", "la"),
("rn", "rn"),
("tn", "tn"),
("an", "an"),
("vi", "vi"),
("ta", "ta"),
("is", "is"),
("fa", "fa"),
("bh", "bh"),
("ug", "ug"),
("ae", "ae"),
("ii", "ii"),
("rw", "rw"),
("lo", "lo"),
("wo", "wo"),
("sn", "sn"),
("sg", "sg"),
("sc", "sc"),
("de", "de"),
("ve", "ve"),
("eo", "eo"),
("id", "id"),
("ur", "ur"),
("to", "to"),
("sd", "sd"),
("nb", "nb"),
("ty", "ty"),
("ha", "ha"),
("km", "km"),
("ho", "ho"),
("tl", "tl"),
("ga", "ga"),
("kj", "kj"),
("xx", "xx"),
("mn", "mn"),
("se", "se"),
("hz", "hz"),
("as", "as"),
("tt", "tt"),
("mo", "mo"),
("fy", "fy"),
("ss", "ss"),
("gd", "gd"),
("ay", "ay"),
("ch", "ch"),
("zu", "zu"),
("be", "be"),
("bm", "bm"),
("vo", "vo"),
("aa", "aa"),
("mi", "mi"),
("ng", "ng"),
("hy", "hy"),
("jv", "jv"),
("yi", "yi"),
("mk", "mk"),
("dz", "dz"),
("fj", "fj"),
("lg", "lg"),
("cs", "cs"),
("om", "om"),
("cu", "cu"),
("sl", "sl"),
("st", "st"),
("oc", "oc"),
("ky", "ky"),
("da", "da"),
("mg", "mg"),
("ca", "ca"),
("os", "os"),
("it", "it"),
("ff", "ff"),
("ik", "ik"),
("bs", "bs"),
("sw", "sw"),
("bg", "bg"),
("fo", "fo"),
("ba", "ba"),
("pi", "pi"),
("dv", "dv"),
("uz", "uz"),
("hr", "hr"),
("lt", "lt"),
("no", "no"),
("kv", "kv"),
("bi", "bi"),
("nd", "nd"),
("co", "co"),
("li", "li"),
("sa", "sa"),
("ce", "ce"),
("ln", "ln"),
("nl", "nl"),
("ts", "ts"),
("ja", "ja"),
("kn", "kn"),
("ig", "ig"),
("ie", "ie"),
("hi", "hi"),
("tw", "tw"),
("gn", "gn"),
("mt", "mt"),
("gl", "gl"),
("kk", "kk"),
("ak", "ak"),
("fr", "fr"),
("br", "br"),
("qu", "qu"),
("sv", "sv"),
("gv", "gv"),
("av", "av"),
("tk", "tk"),
("sk", "sk"),
("kr", "kr"),
("ku", "ku"),
("te", "te"),
("ar", "ar"),
("mr", "mr"),
("su", "su"),
("cy", "cy"),
("na", "na"),
("ru", "ru"),
("ia", "ia"),
("ki", "ki"),
("iu", "iu"),
("za", "za"),
("uk", "uk"),
("lv", "lv"),
("kg", "kg"),
("ps", "ps"),
("ro", "ro"),
("af", "af"),
("sr", "sr"),
("sm", "sm"),
("az", "az"),
("he", "he"),
("my", "my"),
("nn", "nn"),
("hu", "hu"),
("gu", "gu"),
("eu", "eu"),
("si", "si"),
("ti", "ti"),
("th", "th"),
("ne", "ne"),
("pa", "pa"),
("bo", "bo"),
("nv", "nv"),
("oj", "oj"),
("ht", "ht"),
("yo", "yo"),
("ks", "ks"),
("fi", "fi"),
("io", "io"),
("ms", "ms"),
("lb", "lb"),
("kw", "kw"),
("ab", "ab"),
("tg", "tg"),
("am", "am"),
("mh", "mh"),
("ny", "ny"),
("pt", "pt"),
],
)


class APIConfig(BaseModel):
country: Country = Country.world
environment: Environment = Environment.org
Expand Down

0 comments on commit ef5b32c

Please sign in to comment.