Skip to content

Commit

Permalink
Merge pull request #2 from ineelhere/dev
Browse files Browse the repository at this point in the history
INIT release v0.0.1
  • Loading branch information
ineelhere authored Apr 5, 2024
2 parents ce2d930 + 7942012 commit 6908b37
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/python-publish.yml
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 }}
67 changes: 66 additions & 1 deletion README.md
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 🤝`
23 changes: 23 additions & 0 deletions pyproject.toml
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]
1 change: 1 addition & 0 deletions src/startlit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .start import hello, starter, help
22 changes: 22 additions & 0 deletions src/startlit/start.py
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 👀")

0 comments on commit 6908b37

Please sign in to comment.