# How to import submodules

**URL:** <https://discourse.julialang.org/t/how-to-import-submodules/115277>\
**Category:** General Usage\
**Tags:** question\
**Created:** [June 6, 2024, 12:34pm UTC](https://discourse.julialang.org/t/how-to-import-submodules/115277 "2024-06-06T12:34:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![The\_Mastermage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/the_mastermage/32/49444_2.png) [@The\_Mastermage](https://discourse.julialang.org/u/The_Mastermage)\
**Post date:** [June 6, 2024, 12:34pm UTC](https://discourse.julialang.org/t/how-to-import-submodules/115277/1 "2024-06-06T12:34:59Z")

</div>

So I want to write a package for Querying Astronomy data and I want to make extensive use of submodules to seperate different queryable services. An example is in the following code:

```julia
module AstronomyQuery
    module Simbad

        export query_identifier

        function query_identifier(identifier::String)

            println("Nothing Implemented")

            return identifier
        end

    end

end

```

Now I seem to be too dumb to actualy figure out how to import that function. For example in my tests folder. Can anyone help me how to import the submodule correctly?

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [June 6, 2024, 2:20pm UTC](https://discourse.julialang.org/t/how-to-import-submodules/115277/2 "2024-06-06T14:20:08Z")

</div>

```julia
using AstronomyQuery.Simbad: query_identifier

```

(or just `using AstronomyQuery.Simbad` since the function is exported).
