Module Expr Str Import alias ImportFrom alias FunctionDef arguments args defaults body Assign NameStore Call NameLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str For NameStore NameLoad body If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call NameLoad keyword Call NameLoad SubscriptLoad NameLoad Index Num keyword Call NameLoad SubscriptLoad NameLoad Index Num keyword Call NameLoad SubscriptLoad NameLoad Index Num keyword Num keyword Num keyword Num keyword Num keyword Num keyword Num keyword Num keyword Num keyword Num keyword Num Expr Call AttributeLoad NameLoad attr Print BinOpMod Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str For NameStore NameLoad body If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call NameLoad keyword SubscriptLoad NameLoad Index Num keyword Str Expr Call AttributeLoad NameLoad attr Print BinOpMod Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str For NameStore NameLoad body If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call NameLoad keyword SubscriptLoad NameLoad Index Num keyword Str Assign AttributeStore NameLoad attr IfExp CompareNotEq SubscriptLoad NameLoad Index Num Str SubscriptLoad NameLoad Index Num Num Assign AttributeStore NameLoad attr IfExp CompareNotEq SubscriptLoad NameLoad Index Num Str SubscriptLoad NameLoad Index Num Num Assign AttributeStore NameLoad attr IfExp CompareNotEq SubscriptLoad NameLoad Index Num Str SubscriptLoad NameLoad Index Num Num Expr Call AttributeLoad NameLoad attr Print BinOpMod Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str For NameStore NameLoad body If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword SubscriptLoad NameLoad Index Num Index Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Print BinOpAdd BinOpAdd BinOpAdd Str AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str Assign NameStore ListLoad Str Str Str Str Str Str For NameStore NameLoad body If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword SubscriptLoad NameLoad Index Num Index Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call NameLoad SubscriptLoad NameLoad Index Num Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad If NameLoad body Assign NameStore IfExp CompareLtE Call NameLoad SubscriptLoad NameLoad Index Num Num SubscriptLoad NameLoad Index Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr IfExp CompareNotEq SubscriptLoad NameLoad Index Num Str SubscriptLoad NameLoad Index Num Num Expr Call AttributeLoad NameLoad attr Print BinOpAdd Str Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str For NameStore NameLoad body If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword SubscriptLoad NameLoad Index Num Index Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str For NameStore NameLoad body If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword SubscriptLoad NameLoad Index Num Index Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Print BinOpAdd BinOpAdd BinOpAdd Str AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body For NameStore Call NameLoad Num Num body Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpMod Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad If Call AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad keyword BinOpAdd AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Print BinOpMod Str AttributeLoad NameLoad attr orelse Print BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword SubscriptLoad AttributeLoad NameLoad attr Slice Num If Call AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Print BinOpMod Str AttributeLoad NameLoad attr orelse Print BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Slice Num decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str For NameStore NameLoad body If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword SubscriptLoad NameLoad Index Num If Call AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index Num Assign AttributeStore NameLoad attr IfExp CompareNotEq SubscriptLoad NameLoad Index Num Str SubscriptLoad NameLoad Index Num Num Assign AttributeStore NameLoad attr IfExp CompareNotEq SubscriptLoad NameLoad Index Num Str SubscriptLoad NameLoad Index Num Num Assign AttributeStore NameLoad attr IfExp CompareNotEq SubscriptLoad NameLoad Index Num Str SubscriptLoad NameLoad Index Num Num Expr Call AttributeLoad NameLoad attr Print BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str For NameStore NameLoad body If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword SubscriptLoad NameLoad Index Num If Call AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index Num If CompareEq SubscriptLoad NameLoad Index Num Str body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Num If CompareEq SubscriptLoad NameLoad Index Num Str body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Num If CompareEq SubscriptLoad NameLoad Index Num Str body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Num If CompareEq SubscriptLoad NameLoad Index Num Str body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Num If CompareEq SubscriptLoad NameLoad Index Num Str body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Num If CompareEq SubscriptLoad NameLoad Index Num Str body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Print BinOpMod Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str Assign NameStore ListLoad Str Str Str Str Str For NameStore NameLoad body If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword BinOpSub Call NameLoad SubscriptLoad NameLoad Index Num Num If UnaryOpNot Call AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Index Num orelse Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call NameLoad SubscriptLoad NameLoad Index Num If UnaryOpNot Call AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Index Num orelse Assign NameStore SubscriptLoad NameLoad Index Num If CompareEq SubscriptLoad NameLoad Index Call NameLoad SubscriptLoad NameLoad Index Num Str body Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword SubscriptLoad NameLoad Index Call NameLoad SubscriptLoad NameLoad Index Num keyword IfExp CompareNotEq SubscriptLoad NameLoad Index Num Str SubscriptLoad NameLoad Index Num Num Expr Call AttributeLoad NameLoad attr Print BinOpMod Str Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call NameLoad Str Str Assign NameStore Call NameLoad Str Str For NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str body If CompareEq Call NameLoad SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr body For NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str body If CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Call NameLoad SubscriptLoad NameLoad Index Num body Assign NameStore Call AttributeLoad Call NameLoad SubscriptLoad NameLoad Index Num attr Str Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Print BinOpMod Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Str Str Assign NameStore Call NameLoad Str Str Assign NameStore ListLoad Str Str Str Str Str Assign NameStore Num For NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str body If BoolOpAnd CompareNotEq SubscriptLoad NameLoad Index Num Str CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad Str Str For NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str body If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call NameLoad SubscriptLoad NameLoad Index Num If CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Call NameLoad SubscriptLoad NameLoad Index Num body Assign NameStore SubscriptLoad NameLoad Index Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore IfExp CompareNotEq SubscriptLoad NameLoad Index Num Str SubscriptLoad NameLoad Index Num Num Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Print BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AugAssignAdd NameStore Num Print BinOpMod Str Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Dict Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Assign NameStore Call NameLoad Str Str Assign NameStore Num For NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str body If BoolOpAnd CompareNotEq SubscriptLoad NameLoad Index Num Str CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Num body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword SubscriptLoad NameLoad Index Num Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword BinOpAdd BinOpAdd AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Call NameLoad SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Print BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AugAssignAdd NameStore Num Print BinOpMod Str Call NameLoad NameLoad decorator_list
N/A N/A 
This is very, very ugly. PokeAPI V1 was built in one day when I didn't quite
understand how to process all this data, so it takes in a bunch of csv stuff
and dumps it into the models.

I used to go into the django shell and run these commands one at a time to
load the data into the database on prod. It took around 30-40 minutes to run
some of the scripts.

The builder for V2 will be exceptionally better than this.

So - if you want to see some of the worst code I've ever written, look below:

- Paul Hallett

 N/A csv pokemon.models * build_pokes N/A N/A N/A N/A N/A file N/A open data/v1/pokemon.csv rb N/A rdr N/A N/A csv reader file delimiter , N/A row rdr N/A N/A N/A N/A row N/A 0 id N/A N/A new_p N/A Pokemon pkdx_id N/A int N/A row N/A 0 name N/A str N/A row N/A 1 exp N/A int N/A row N/A 5 catch_rate 0 happiness 0 hp 0 attack 0 defense 0 speed 0 sp_atk 0 sp_def 0 total 0 egg_cycles 0 N/A N/A N/A new_p save N/A N/A created pokemon %s N/A new_p name N/A build_abilities N/A N/A N/A N/A N/A file N/A open data/v1/abilities.csv rb N/A rdr N/A N/A csv reader file delimiter , N/A row rdr N/A N/A N/A N/A row N/A 0 id N/A N/A new_a N/A Ability name N/A row N/A 1 description N/A N/A N/A new_a save N/A N/A created ability %s N/A new_a name N/A build_moves N/A N/A N/A N/A N/A file N/A open data/v1/moves.csv rb N/A rdr N/A N/A csv reader file delimiter , N/A row rdr N/A N/A N/A N/A row N/A 0 id N/A N/A new_a N/A Move name N/A row N/A 1 description N/A N/A new_a accuracy N/A N/A N/A row N/A 6 N/A row N/A 6 0 N/A N/A new_a pp N/A N/A N/A row N/A 5 N/A row N/A 5 0 N/A N/A new_a power N/A N/A N/A row N/A 4 N/A row N/A 4 0 N/A N/A N/A new_a save N/A N/A created move %s N/A new_a name N/A build_ability_pokes N/A N/A N/A N/A N/A file N/A open data/v1/ability_pokes.csv rb N/A rdr N/A N/A csv reader file delimiter , N/A row rdr N/A N/A N/A N/A row N/A 0 pokemon_id N/A N/A poke N/A N/A N/A N/A Pokemon objects filter pkdx_id N/A row N/A 0 N/A 0 N/A ab N/A N/A N/A Ability objects get pk N/A int N/A row N/A 1 N/A N/A N/A N/A poke abilities add ab N/A N/A N/A poke save N/A N/A N/A N/A added  N/A ab name  to  N/A poke name N/A build_move_pokes N/A N/A N/A N/A N/A file N/A open data/v1/poke_moves.csv rb N/A rdr N/A N/A csv reader file delimiter , N/A LEARN N/A level up egg move tutor machine other N/A row rdr N/A N/A N/A N/A row N/A 0 pokemon_id N/A N/A poke N/A N/A N/A N/A Pokemon objects filter pkdx_id N/A row N/A 0 N/A 0 N/A mv N/A N/A N/A Move objects get pk N/A int N/A row N/A 2 N/A N/A pm created N/A N/A N/A MovePokemon objects get_or_create pokemon poke move mv N/A created N/A N/A learn N/A N/A N/A int N/A row N/A 3 5 N/A LEARN N/A N/A int N/A row N/A 3 N/A LEARN N/A 5 N/A N/A pm learn_type learn N/A N/A pm level N/A N/A N/A row N/A 4 N/A row N/A 4 0 N/A N/A N/A pm save N/A N/A added  N/A N/A pm __unicode__ N/A build_egg_pokes N/A N/A N/A N/A N/A file N/A open data/v1/pokes_eggs.csv rb N/A rdr N/A N/A csv reader file delimiter , N/A row rdr N/A N/A N/A N/A row N/A 0 species_id N/A N/A poke N/A N/A N/A N/A Pokemon objects filter pkdx_id N/A row N/A 0 N/A 0 N/A egg N/A N/A N/A EggGroup objects get pk N/A int N/A row N/A 1 N/A N/A N/A N/A poke egg_group add egg N/A N/A N/A poke save N/A build_type_pokes N/A N/A N/A N/A N/A file N/A open data/v1/poke_types.csv rb N/A rdr N/A N/A csv reader file delimiter , N/A row rdr N/A N/A N/A N/A row N/A 0 pokemon_id N/A N/A poke N/A N/A N/A N/A Pokemon objects filter pkdx_id N/A row N/A 0 N/A 0 N/A ty N/A N/A N/A Type objects get pk N/A int N/A row N/A 1 N/A N/A N/A N/A poke types add ty N/A N/A N/A poke save N/A N/A N/A N/A added  N/A ty name  to  N/A poke name N/A build_sprites N/A N/A N/A N/A N/A i N/A range 1 719 N/A N/A str_num N/A str i N/A sfile N/A img/%s.png str_num N/A p N/A N/A N/A Pokemon objects filter pkdx_id i N/A N/A N/A p exists N/A N/A p N/A p N/A 0 N/A s N/A Sprite name N/A N/A p name _auto image sfile N/A N/A N/A s save N/A N/A built sprite for %s N/A p name N/A N/A N/A pokemon sprite with id %d does not exist i N/A poke_sprite_links N/A N/A N/A N/A N/A i N/A N/A N/A Sprite objects all N/A N/A p N/A N/A N/A Pokemon objects filter name N/A N/A i name N/A -5 N/A N/A N/A p exists N/A N/A p N/A p N/A 0 N/A N/A N/A N/A p sprites add i N/A N/A N/A p save N/A N/A Sprite added to pokemon %s N/A p name N/A N/A N/A %s pokemon does not exist N/A N/A i name N/A -5 N/A build_poke_stats N/A N/A N/A N/A N/A 
    Get each Pokemon and build stats for it from two seperate files.
     N/A file N/A open data/v1/pokemon.csv rb N/A rdr N/A N/A csv reader file delimiter , N/A row rdr N/A N/A N/A N/A row N/A 0 id N/A N/A p N/A N/A N/A Pokemon objects filter pkdx_id N/A row N/A 0 N/A N/A N/A p exists N/A N/A p N/A p N/A 0 N/A N/A p height N/A N/A N/A row N/A 3 N/A row N/A 3 0 N/A N/A p weight N/A N/A N/A row N/A 4 N/A row N/A 4 0 N/A N/A p happiness N/A N/A N/A row N/A 5 N/A row N/A 5 0 N/A N/A N/A p save N/A N/A built stats for %s N/A p name N/A file N/A open data/v1/pokemon_stats.csv N/A rdr N/A N/A csv reader file delimiter , N/A row rdr N/A N/A N/A N/A row N/A 0 pokemon_id N/A N/A p N/A N/A N/A Pokemon objects filter pkdx_id N/A row N/A 0 N/A N/A N/A p exists N/A N/A p N/A p N/A 0 N/A N/A N/A row N/A 1 1 N/A N/A N/A p hp N/A row N/A 2 N/A N/A N/A row N/A 1 2 N/A N/A N/A p attack N/A row N/A 2 N/A N/A N/A row N/A 1 3 N/A N/A N/A p defense N/A row N/A 2 N/A N/A N/A row N/A 1 4 N/A N/A N/A p sp_atk N/A row N/A 2 N/A N/A N/A row N/A 1 5 N/A N/A N/A p sp_def N/A row N/A 2 N/A N/A N/A row N/A 1 6 N/A N/A N/A p speed N/A row N/A 2 N/A N/A N/A p save N/A N/A stat for %s added N/A p name N/A build_evolutions N/A N/A N/A N/A N/A 
    Build all the evolution links
     N/A file N/A open data/v1/evolutions.csv rb N/A rdr N/A N/A csv reader file delimiter , N/A method N/A level_up trade stone other N/A row rdr N/A N/A N/A N/A row N/A 0 id N/A N/A frm N/A N/A N/A Pokemon objects filter pkdx_id N/A N/A int N/A row N/A 1 1 N/A N/A N/A N/A frm exists N/A N/A frm N/A N/A N/A N/A Pokemon objects filter pkdx_id 1 N/A 0 N/A N/A frm N/A frm N/A 0 N/A to N/A N/A N/A Pokemon objects filter pkdx_id N/A int N/A row N/A 1 N/A N/A N/A N/A to exists N/A N/A to N/A N/A N/A N/A Pokemon objects filter pkdx_id 2 N/A 0 N/A N/A to N/A to N/A 0 N/A N/A N/A method N/A N/A int N/A row N/A 2 level_up N/A N/A e N/A Evolution frm frm to to method N/A method N/A N/A int N/A row N/A 2 level N/A N/A N/A row N/A 4 N/A row N/A 4 0 N/A N/A N/A e save N/A N/A created link %s N/A N/A e __unicode__ N/A build_move_descriptions N/A N/A N/A N/A N/A 
        Build all the move descriptions
     N/A m N/A N/A N/A Move objects all N/A N/A f_moves N/A open data/moves.csv rb N/A f_descrips N/A open data/move_effects.csv rb N/A row N/A N/A csv reader f_moves delimiter , N/A N/A N/A N/A str N/A row N/A 1 N/A m name N/A N/A drow N/A N/A csv reader f_descrips delimiter , N/A N/A N/A N/A str N/A row N/A 10 N/A str N/A drow N/A 0 N/A N/A s N/A N/A N/A str N/A drow N/A 3 replace $effect_chance N/A str N/A row N/A 11 N/A s N/A N/A s replace [ N/A s N/A N/A s replace ] N/A N/A m description s N/A N/A N/A m save N/A N/A added description to %s N/A m name N/A build_complex_evolutions N/A N/A N/A N/A N/A 
    Build complex evolutions from a better list
     N/A fspecies N/A open data/v1/species.csv rb N/A fevols N/A open data/v1/evolutions.csv rb N/A method N/A level_up trade stone other N/A c 0 N/A row N/A N/A csv reader fspecies delimiter , N/A N/A N/A N/A N/A row N/A 0 id N/A N/A row N/A 3 N/A N/A frm N/A N/A N/A Pokemon objects get pkdx_id N/A int N/A row N/A 3 N/A fevols N/A open data/v1/evolutions.csv rb N/A erow N/A N/A csv reader fevols delimiter , N/A N/A N/A N/A erow N/A 0 id N/A N/A to N/A N/A N/A Pokemon objects get pkdx_id N/A int N/A erow N/A 1 N/A N/A N/A int N/A erow N/A 1 N/A int N/A row N/A 0 N/A N/A mthd N/A method N/A N/A int N/A erow N/A 2 N/A lvl N/A N/A N/A erow N/A 4 N/A erow N/A 4 0 N/A e N/A Evolution frm frm to to method mthd level lvl N/A N/A N/A e save N/A N/A created evolution from %s to %s N/A N/A frm name N/A to name N/A c 1 N/A N/A %s created N/A str c N/A build_pokedex_descriptions N/A N/A N/A N/A N/A 
    Build the pokedex descriptions for Pokemon
     N/A gens N/A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 1 1 1 1 1 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 6 6 N/A descrips N/A open data/v1/pokedex_descriptions.csv rb N/A c 0 N/A row N/A N/A csv reader descrips delimiter , N/A N/A N/A N/A N/A row N/A 0 species_id N/A N/A int N/A row N/A 2 9 N/A N/A p N/A N/A N/A Pokemon objects get pkdx_id N/A int N/A row N/A 0 N/A g N/A N/A N/A Game objects get pk N/A row N/A 1 N/A N/A d _ N/A N/A N/A Description objects get_or_create name N/A N/A N/A p name _gen_ N/A gens N/A N/A int N/A row N/A 1 description N/A row N/A 3 N/A N/A N/A N/A d game add g N/A N/A N/A d save N/A N/A Description %s created, %s added N/A N/A d name N/A g name N/A c 1 N/A N/A made %s descriptions N/A str c N/A