1.1.1.4. pymacies_arg.loaders module
PymaciesArg.
An extension that registers all pharmacies in Argentina.
- class pymacies_arg.loaders.BaseLoader[source]
Bases:
objectBase class for Load all tables in DB.
- load_table(df, engine)[source]
Read a data frame from csv file path.
Load
Departamentostable in the database from sql query.- Parameters
df (
pandas.DataFrame) – The dataframe must with the values.- Returns
df.to_sql – A sql query such that load all values in the database.
- Return type
function
- table_name = 'Base'
- class pymacies_arg.loaders.DepartmentsLoader(engine)[source]
Bases:
pymacies_arg.loaders.BaseLoaderLoad Departamentos table in the DB.
- table_name
The name of table.
- Type
str, optional (default=’departamentos’)
- load_table(file_path)[source]
Read a csv file from a file path and load
departamentostable.Load
Departamentostable in the database from sql query.- Parameters
file_path (str) – The path of csv file with all
Departamentos.- Returns
super().load_table(df) – A sql query such that load all
Departamentosin the database.- Return type
function
- table_name = 'departments'
- class pymacies_arg.loaders.LocationsLoader(engine)[source]
Bases:
pymacies_arg.loaders.BaseLoaderLoad Localidades table in the DB.
- table_name
The name of table.
- Type
str, optional (default=’localidades’)
- load_table(file_path)[source]
Read a csv file from a file path and and load
localidadestable.Load
Localidadestable in the database from sql query.- Parameters
file_path (str) – The path of csv file with all
Localidades.- Returns
super().load_table(df) – A sql query such that load all
Localidadesin the database.- Return type
function
- table_name = 'locations'
- class pymacies_arg.loaders.PharmaciesLoader(engine)[source]
Bases:
pymacies_arg.loaders.BaseLoaderLoad Farmacias table in the DB.
- table_name
The name of table.
- Type
str, optional (default=’farmacias’)
- load_table(file_path)[source]
Read a csv file from a file path and and load
farmaciastable.Load
Farmaciastable in the database from sql query.- Parameters
file_path (str) – The path of csv file with all
Farmacias.- Returns
super().load_table(df) – A sql query such that load all
Farmaciasin the database.- Return type
function
- table_name = 'pharmacies'