Questions tagged [import]
The import tag has no summary.
                38 questions
            
            
            
                2
            
            votes
        
        
            
                5
            
            answers
        
        
            
                1k
            
            views
        
        
            
            
            
        Why don't languages auto import everything based on namespace?
                    This is basically a continuation of "Why don't languages auto import everything?" but with a slightly altered premisse:
Say we have a language like C++ / python that uses namespaces to ...
                
            
       
        
            
                0
            
            votes
        
        
            
                1
            
            answer
        
        
            
                230
            
            views
        
        
            
            
        Best practice when declaring imports with different execution contexts in python?
                    Say I have a Python project that looks like this:
project/
├── package/
│   ├── __init__.py
│   ├── module1.py
└── main.py
I would like package/ to be self-contained, though it is called from main.py....
                
            
       
        
            
                -1
            
            votes
        
        
            
                2
            
            answers
        
        
            
                191
            
            views
        
        
            
            
        Should uniqueness validation be on the database level or backend codebase level in data import
                    There is a kinda ETL task of importing data from csv to the database in project with legacy codebase and legacy database**. Data should be validated before persisting to database.
Validation includes ...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                614
            
            views
        
        
            
            
        Is it bad practice to export all the names from one module both as named exports and as a default export?
                    I like to export the names in my modules both as individual named exports and grouped together in a default export. Like this:
// mod.js
export function f() {}
export const x = true
export default {f,...
                
            
       
        
            
                0
            
            votes
        
        
            
                1
            
            answer
        
        
            
                707
            
            views
        
        
            
            
        What's the best way to import a python module in a python module without cluttering the modules namepace? [closed]
                    Let's say I am writing a python module module.py. Which provides functionalities for other parts of my code. Of course, the module has to import other modules. A simple example:
import abc as _abc
...
                
            
       
        
            
                1
            
            vote
        
        
            
                5
            
            answers
        
        
            
                842
            
            views
        
        
            
            
            
        Why don't languages auto import everything?
                    Why is there a such thing as import in programming languages? If a package does not exist, then trying to import it would cause an error anyway. So why don't languages just auto import ALL available ...
                
            
       
        
            
                0
            
            votes
        
        
            
                1
            
            answer
        
        
            
                945
            
            views
        
        
            
        How to use lazy import to speed up a list of known types in python? [closed]
                    I have an application in which the user can describe an analysis job via a yaml like
analysis:
  learner: 
    name: LinearRegression
    args:
      solver: liblinear
and then it is parsed to ...
                
            
       
        
            
                0
            
            votes
        
        
            
                1
            
            answer
        
        
            
                97
            
            views
        
        
            
        Better design for a REST import into web store
                    I have an import that needs to grab data from a REST service and import into an web store. It's basically an ETL type of service, but because the REST service can be slow and I don't want to call it ...
                
            
       
        
            
                0
            
            votes
        
        
            
                2
            
            answers
        
        
            
                121
            
            views
        
        
            
            
            
        Transferring data from 1 web app into another offline
                    I have a web app that will be used locally on 2 different site. The program is a Vue web app made with node.js and express, using MySQL database. Due to limitation (no internet in site 1), there is no ...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                567
            
            views
        
        
            
        Python Unit Tests Mocking Imports - Removing Dependencies for CI/CD
                    I have a project written in python that I would like to create unit tests on.
This project has a dependency on a database project which is a sort of abstraction layer to data connections.
The issue ...
                
            
       
        
            
                -1
            
            votes
        
        
            
                1
            
            answer
        
        
            
                2k
            
            views
        
        
            
        Python dynamically import modules
                    I am trying to find the best practice for importing modules dynamically. I have multiple files in a specific folder called providers which contain a class Updater and all of them have the same objects....
                
            
       
        
            
                3
            
            votes
        
        
            
                1
            
            answer
        
        
            
                1k
            
            views
        
        
            
        Strictly only importing modules in subdirectories: is this a good rule?
                    I'm making my 1st official project. It's written in Python, is open-sources, and I'd like people to be able to freely and easily fork and modify the code. The project name is "shelf" and the ...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                245
            
            views
        
        
            
            
            
        Component based architectures in JS / PHP: what indicators suggest that a UI element ought to be written as an importable component?
                    N.B. Several months after initially asking this question (and not coming up with any satisfactory answers) I am now learning to use HTML Custom Elements / WebComponents. It seems the same question ...
                
            
       
        
            
                5
            
            votes
        
        
            
                1
            
            answer
        
        
            
                836
            
            views
        
        
            
            
        Are legacy C# DataTable/SqlDataAdapters exponentially faster than SqlConnection/SqlCommand and/or LINQ to SQL DataContext.ExecuteCommand calls? [closed]
                    I can't believe DataTable/SqlDataAdapter massively beat out System.Data.Linq.DataContext.ExecuteCommand and ExecuteNonQuery (tried with both Stored Procedures and command text) and just straight ...
                
            
       
        
            
                1
            
            vote
        
        
            
                0
            
            answers
        
        
            
                56
            
            views
        
        
        How to develop an Import/Export Functionality for my node application
                    I have a configuration application in Nodejs. It has a Component with name and uuid. A Component can have many Schemas. A Schema has a uuid, name, componentId, json. A Schema can have many ...
                
            
       
         
         
         
        