-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from ineelhere/dev
INIT release v0.0.1
- Loading branch information
Showing
5 changed files
with
144 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Upload Python Package | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deploy: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
- name: Build package | ||
run: poetry build | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,66 @@ | ||
# startlit | ||
# StartLit | ||
|
||
Get started with a streamlit app template code in style. | ||
|
||
### Install the package from PYPI | ||
|
||
```python | ||
pip install startlit | ||
``` | ||
### Import the package | ||
|
||
```python | ||
from startlit import * | ||
hello() | ||
``` | ||
Running `hello()` should give you a simple welcome message - | ||
``` | ||
Hello there 👋 | ||
Welcome to Startlit! 🚀 | ||
``` | ||
### Download a very simple starter app | ||
|
||
```python | ||
starter() | ||
``` | ||
Output - | ||
``` | ||
📥 Starter app downloaded!📥 | ||
👀 Look for 'app.py' and 'requirements.txt' file in your working directory 👀 | ||
``` | ||
|
||
If you look up in your local/working directory, you should find the 2 files present as mentioned above. | ||
|
||
___ | ||
|
||
```bash | ||
# just to check - files have been downloaded | ||
!ls | ||
``` | ||
Output - | ||
``` | ||
app.py requirements.txt | ||
``` | ||
___ | ||
``` bash | ||
# just to check - app.py actually has streamlit code | ||
!cat app.py | ||
``` | ||
Output - | ||
```python | ||
import streamlit as st | ||
|
||
# Display a title | ||
st.title('Hello, World! 🌎🚀') | ||
|
||
# Add a description with an inline comment | ||
st.write("This is my first app in Streamlit! 📝") # Comment: Don't forget to smile | ||
``` | ||
|
||
___ | ||
|
||
|
||
**© `Indraneel Chakraborty` | 2024** 🧑💻[ Email](mailto:[email protected]) | [LinkedIn](https://www.linkedin.com/in/indraneelchakraborty/) | [GitHub](https://github.com/ineelhere) | ||
|
||
|
||
`Collaborations and Contributions are welcome 🤝` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry] | ||
name = "startlit" | ||
version = "0.0.1" | ||
description = "Get started with a streamlit app template code in style" | ||
authors = ["Indraneel Chakraborty"] | ||
readme = "README.md" | ||
homepage = "https://github.com/ineelhere/startlit" | ||
license = "Apache License - Version 2.0" | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.8" | ||
|
||
[tool.poetry.dev-dependencies] | ||
pytest = ">=7.0" | ||
twine = ">=4.0.2" | ||
|
||
[tool.poetry.scripts] | ||
|
||
[tool.poetry.extras] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .start import hello, starter, help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import urllib.request | ||
|
||
def hello(): | ||
""" | ||
A function that prints a greeting message to the console. | ||
No parameters required. | ||
""" | ||
print("Hello there 👋 \nWelcome to Startlit! 🚀") | ||
|
||
def help(): | ||
""" | ||
A function that prints a list of available commands to the console. | ||
""" | ||
print("Available commands:\n🤗 hello()\n📥 starter()\n📚 help()\n🐙 Need more help? Post an issue at https://github.com/ineelhere/startlit/issues") | ||
|
||
def starter(): | ||
""" | ||
A function to download the starter app files from a specified URL and print a confirmation message. | ||
""" | ||
urllib.request.urlretrieve("https://raw.githubusercontent.com/ineelhere/startlit/starter/app.py", "app.py") | ||
urllib.request.urlretrieve("https://raw.githubusercontent.com/ineelhere/startlit/starter/requirements.txt", "requirements.txt") | ||
print("📥 Starter app downloaded!📥\n👀 Look for 'app.py' and 'requirements.txt' file in your working directory 👀") |