# How to use function from package directly?

**URL:** <https://discourse.julialang.org/t/how-to-use-function-from-package-directly/23531>\
**Category:** New to Julia\
**Created:** [April 25, 2019, 9:19pm UTC](https://discourse.julialang.org/t/how-to-use-function-from-package-directly/23531 "2019-04-25T21:19:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmed\_Salih](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ahmed_salih/32/206579_2.png) [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Post date:** [April 25, 2019, 9:19pm UTC](https://discourse.julialang.org/t/how-to-use-function-from-package-directly/23531/1 "2019-04-25T21:19:21Z")

</div>

Hello!

So I managed to follow the simple “Hello world!” example and then I managed to add my new source code. The name of the package is “PostSPH”. Whenever I try to use a function from there I have to do:

```julia
using PostSPH
PostSPH.function(input)

```

But how does something like, Dataframes, avoid this?

![image](https://global.discourse-cdn.com/julialang/original/3X/c/e/ce55df89d3e37df59fe4f91ddc58ea1e0aa1ac7e.png)

They don’t have to write Dataframes.Dataframe(…)

Kind regards

---

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [April 25, 2019, 9:23pm UTC](https://discourse.julialang.org/t/how-to-use-function-from-package-directly/23531/2 "2019-04-25T21:23:16Z")

</div>

You’re looking for the `export` keyword:

```julia
module MyModule

export my_function

function my_function()
  println("hello")
end

end

```

The `export my_function` line means that anyone who runs `using MyModule` will be able to call `my_function` without needing to do `MyModule.my_function`.

---

<div class="post-metadata">

**Author:** ![Ahmed\_Salih](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ahmed_salih/32/206579_2.png) [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Post date:** [April 25, 2019, 9:24pm UTC](https://discourse.julialang.org/t/how-to-use-function-from-package-directly/23531/3 "2019-04-25T21:24:26Z")

</div>

Thanks! Will do it now, changed question title to better frame the issue for someone else in the future.

Kind regards
